Version: MySQL official website, download the win7-64-bit MySQL server installation package.
Decompression: C:\Program files\mysql\mysql-5.6.25-winx64.
Configure environment variables: Mysql_home=c:\program files\mysql\mysql-5.6.25-winx64, add to Path:%mysql_home%/bin
Configuration: Change the My-default.ini file name to My.ini and add a line of code under [mysqld]: Character-set-server = GBK
Add 3 service Startup parameters:
Basedir = C:/Program files/mysql/mysql-5.6.25-winx64/
DataDir = C:/Program files/mysql/mysql-5.6.25-winx64/data/
Tmpdir = C:/Program files/mysql/mysql-5.6.25-winx64/temp/
User=mysql
Install MySQL at this time, command:mysqld--install mysql--defaults-file= "My.ini"
Start MySQL, command: net start MySQL
Will find an error "Unable to start the system error 2", because the installation is not known, the system does not know the configuration file loading path, the system load a nonexistent path by default,
So you need to change the path and go to the registry:
Hkey_local_machine-system-currentcontrolset-services-mysql (service name)-imagepath
Value changed to: "C:\Program files\mysql\mysql-5.6.25-winx64\bin\mysqld"--defaults-file= "C:\Program files\mysql\ Mysql-5.6.25-winx64\my.ini "MySQL
Execute command again: net start MySQL, if the parameters are configured correctly, the tangent tmpdir path already exists, then the boot succeeds;
Conversely, error, modify parameters, restart can be.
Note: The DataDir-bit installation package extracts the data directory, the Tmpdir directory must exist, MySQL startup will check whether the directory exists, not automatically created.
Start, stop, and uninstall of MySQL service
Run at the Windows command prompt:
Startup: net start MySQL
STOP: net stop MySQL
Uninstall: SC Delete MySQL
Win7 64-bit installation MySQL