MySQL 5.7.22 binary package installation and installation-free version Windows configuration method

MySQL 5.7.22 binary package installation and installation-free version Windows configuration method

The following code introduces the installation method of MySQL 5.7.22 binary package. The specific code is as follows:

.Directory planning:
Program directory: /usr/local/mysql
Data directory: /data/mysql
PID and SOCKET file location: /tmp
.File Download:
By default, only the latest version is provided. The download address of the historical version is:
https://downloads.mysql.com/archives/
.7.22 version download:
# wget https://cdn.mysql.com/archives/mysql-5.7/mysql-5.7.22-linux-glibc2.12-x86_64.tar.gz
The file download size is approximately 614M.
#tar -xzf mysql-5.7.22-linux-glibc2.12-x86_64.tar.gz -C /usr/local/
#mv /usr/local/mysql-5.7.22-linux-glibc2.12-x86_64/ /usr/local/mysql
# echo "export PATH=$PATH:/usr/local/mysql/bin" >/etc/profile.d/mysql.sh
# source /etc/profile.d/mysql.sh
.Create users and authorization:
#useradd mysql
#passwd mysql
#mkdir -p /data/mysql
#chown -R mysql:mysql /data/mysql
#chmod -R 755 /data/mysql
.Set parameters:
[mysqld]
#basic
#skip-grant-tables 
#validate_password = OFF
datadir = /data/mysql
port = 3306
pid-file = /tmp/mysql.pid
socket = /tmp/mysql.sock
log_error = error.log
slow-query-log = 1
slow-query-log-file = slow.log
long_query_time = 0.2
log-bin = mysql_bin.log
binlog_format = ROW
expire-logs-days = 1
relay-log = mysql_relay.log
relay_log_recovery = 1
general_log = on
general_log_file = general.log
lower_case_table_names = 1
server-id = 1
character_set_client_handshake = FALSE
character_set_server = utf8mb4
collation_server = utf8mb4_unicode_ci
init_connect = 'SET NAMES utf8mb4'
interactive_timeout = 172800
wait_timeout = 172800
max_prepared_stmt_count = 1048576 
max_connections = 8000
#connections
 max_connections=4000
 key_buffer_size=200M
 low_priority_updates=1
 table_open_cache = 8000
 back_log=1500
 query_cache_type=0
 table_open_cache_instances=16
#files
 innodb_file_per_table = on
 innodb_log_file_size=1024M
 innodb_log_files_in_group = 3
 innodb_open_files=4000
#buffers
innodb_buffer_pool_size=1G
innodb_buffer_pool_instances=32
#innodb_additional_mem_pool_size=20M
innodb_log_buffer_size=64M
join_buffer_size=32K
sort_buffer_size=32K
#innodb
innodb_checksums=0
innodb_doublewrite=0
innodb_support_xa=0
innodb_thread_concurrency=0
innodb_flush_log_at_trx_commit=2
innodb_max_dirty_pages_pct=50
innodb_use_native_aio=1
innodb_stats_persistent = 1
#innodb_spin_wait_delay = 6 / 96
#performance
innodb_adaptive_flushing = 1
innodb_flush_neighbors = 0
innodb_read_io_threads = 4
innodb_write_io_threads = 4
innodb_io_capacity = 4000
innodb_purge_threads=1
innodb_adaptive_hash_index=0
#monitor
innodb_monitor_enable = '%'
performance_schema=OFF
[mysql]
user = root
.Initialize the database instance:
/usr/local/mysql/bin/mysqld --user=mysql --basedir=/usr/local/mysql --datadir=/data/mysql --initialize-insecure
.start up:
# cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysql
# /etc/init.d/mysql start
Starting MySQL... SUCCESS! 
.Verify and set up remote access:
[root@node1 soft]# mysql -p -S /tmp/mysql.sock
mysql> grant all privileges on *.* to root@'%' identified by 'oracle' with grant option;
Query OK, 0 rows affected, 1 warning (0.01 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

Supplement: MySQL 5.7.22 free installation version Windows configuration

Download MySQL 5.7.22

Unzip the file and find that there is no data directory in the root directory

Enter the bin directory:

cd d:\Program Files\MySQL\MySQL Server 5.7\bin

run

mysqld --initialize-insecure --user=mysql

After executing the command, I found that there was an additional data folder in the root directory.

Configure the my.ini file,

Execute the command:

mysqld install MYSQL57 --defaults-file="G:\DataDBs\mysql-5.7\my.ini"

Start the mysql service, the default password is empty and log in

update mysql.user set authentication_string=password('newpwd'),password_expired='N' where user='root';

Change the password and modify the expiration policy (the field name is slightly different from MySQL 5.6, 5.6: update user set password = password('newpwd'), password_expired='N' where user = 'root';)

-- Enable remote connection permissions grant all on *.* to root@'%' identified by 'newpwd' with grant option;
flush privileges;

Then restart the mysql service and the configuration is complete

Summarize

The above is the MySQL 5.7.22 binary package installation and free installation version Windows configuration method introduced by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website!

You may also be interested in:
  • iOS Assembly Tutorial - ARM64 Assembly Basics Tutorial
  • Ubuntu16.04 installation mysql5.7.22 graphic tutorial
  • How to install MySQL server community version MySQL 5.7.22 winx64 in win10
  • Installation process of MySQL5.7.22 on Mac
  • The whole process of installing mysql5.7.22 under ARM64 architecture

<<:  Linux Disk Quota Management Graphical Example

>>:  How to deploy redis in linux environment and install it in docker

Recommend

Using CSS3 to achieve progress bar effect and dynamically add percentage

During the project, I started using the js reques...

Detailed explanation of transaction isolation levels in MySql study notes

background When we talk about transactions, every...

How to implement distributed transactions in MySQL XA

Table of contents Preface XA Protocol How to impl...

Nginx external network access intranet site configuration operation

background: The site is separated from the front ...

Docker runs operations with specified memory

as follows: -m, --memory Memory limit, the format...

How to successfully retrieve VMware Esxi root password after forgetting it

Prepare a CentOS6 installation disk (any version)...

Common Linux English Error Chinese Translation (Newbies Must Know)

1.command not found command not found 2. No such ...

Use xshell to connect to the Linux server

Benefits of using xshell to connect to Linux We c...

Add ?v= version number after js or css to prevent browser caching

Copy code The code is as follows: <span style=...

Causes and solutions for slow MySQL queries

There are many reasons for slow query speed, the ...

Detailed explanation of Nginx log customization and enabling log buffer

Preface If you want to count the source of websit...

Sample code for implementing two-way authentication with Nginx+SSL

First create a directory cd /etc/nginx mkdir ssl ...

A brief analysis of JS original value and reference value issues

Primitive values ​​-> primitive types Number S...