Install the decompressed MySql version on Windows 10 (recommended) and decompress mysql
Decompress mysql win10
Download and decompress
Mysql: Download link for version 5.7.13 (you can download it directly through the zip link on the official website without having to register an Oracle account)
Decompress the mysql-5.7.13-winx64.zip to any directory and I decompress it“D:/Program Files/mysql/mysql-5.7.13-winx64”
Configure System Variables
Add a"D:\Program Files\mysql\mysql-5.7.13-winx64\bin
"
Modify the default configuration file
There is a configuration file mysql-5.7.13-winx64 under the directory my-default.ini, copy one as my. ini.
Modify basedir and datadir in my. ini
Basedir = "D:/Program Files/mysql/mysql-5.7.13-winx64" # The Directory datadir = "D: /Program Files/mysql/mysql-5.7.13-winx64/data "# server_id must also be set, otherwise the ERROR [ERROR] You have enabled the binary log, but you haven't provided the mandatory server-id.Please refer to the proper server start-up parameters documentation #2016-07-18T15: 29: 23.097024Z 0 [ERROR] Abortingserver_id = 1
Install
Execute mysqld -- initialize -- console under the mysql-5.7.13-winx64 \ bin directory, be sure to be the bin directory, and be sure to have -- console, the last line can see the generated password, can't I log on without a password.
PS D:\Program Files\mysql\mysql-5.7.13-winx64\bin> mysqld --initialize --console2016-07-18T15:56:17.820761Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details)..........2016-07-18T15:56:18.449148Z 1 [Note] A temporary password is generated for root@localhost: :esIkHCaG2,d
This command will initialize and generate many files in the datadir directory set by my. ini.
Start
Then installmysql mysqld install
To reinstall mysql, you must uninstall mysql.mysqld remove
Then start mysql
Ps d: \ Program Files \ mysql \ mysql-5.7.13-winx64 \ bin> net start mysqlMySQL service is starting. MySQL service has started successfully.
Run commandsbin\mysql_secure_installation.exe
Perform security settings, such as resetting the password and whether remote access is allowed.
Run mysql after startupmysql -u root -p
You can perform database operations. For example, run the following command.
# Show databases; # enter the database use test; # show tables;
The above section describes how to install and decompress MySql on Windows 10 (recommended). I hope it will help you. If you have any questions, please leave a message, the editor will reply to you in a timely manner. Thank you very much for your support for the help House website!