After mysql 5.7 windows is decompressed, it can only be installed manually. That’s just right. The main points are as follows
1. Decompression
2. Rename my_default.ini to my.ini, and then at least open and edit as follows:
[client]
port=3309
[mysql]
default-character- set=utf8
[mysqld]
# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M
# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin
# These are commonly set, remove the # and set as required.
basedir ="C:\mysql5.7"
datadir = "C :\mysql5.7/mysql57data"
port = 3309
# server_id = .....
default-storage-engine=INNODB
# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
join_buffer_size = 128M sort_buffer_size = 2M read_rnd_buffer_size
= 2M
sql_mode=NO_ENGINE_SUBSTITUTION, STRICT_TRANS_TABLES
Other parameters can be adjusted by referring to the Internet
3 Set the PATH, which is convenient for command line invocation in DOS
mode. Open the command line and
enter : mysqld -install
// Execute the installation operation
mysqld --defaults-file=d:\mysql\my.ini --initialize-insecure --console
--defaults-file The parameter specifies the location of the configuration file to be used
The –initialize-insecure parameter is a newly added initialization database parameter in MySql 5.7.7. This parameter indicates that a root user without a password is created while initializing the database. The
–console parameter indicates that the log is output to the command line interface .
5 Create a service
mysqld -- install MYSQL57 --defaults-file=d:\mysql\my.ini
can remove
mysqld --remove MYSQL57
6 Start the service under the control panel
7 The default mysql -u root -p on the command line, do not enter a password, pay attention to change The root password is different! And the previous version, like this:
use mysql;
//Enter the mysql database.
UPDATE user SET authentication_string=PASSWORD("new password") WHERE User='root';
//Modify the root account password.
FLUSH PRIVILEGES;
//Refresh MySQL's system privilege related tables, otherwise access will be denied.
quit;
//Exit mysql.
8 success
MySQL 5.7 Windows installation strategy
Guess you like
Origin http://10.200.1.11:23101/article/api/json?id=326610755&siteId=291194637
Recommended
Ranking