Install mysql on 64-bit Windows 7 and mysql on 64-bit Windows 7
Version: mysql official website, download the win7-64 bit mysql Server Installation Package.
Decompress: C: \ Program Files \ mysql \ mysql-5.6.25-winx64.
Configure environment variable: 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 encoding under [mysqld]: character-set-server = gbk
Add three 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
To install mysql, run the following command:Mysqld -- install MySQL -- defaults-file = "my. ini"
Start mysql with the command: net start MySQL
The error "System Error 2 cannot be started" is reported because the installation is free and the system does not know the configuration file loading path. The system loads a non-existent path by default,
Therefore, you need to change the path to the registry:
HKEY_LOCAL_MACHINE-SYSTEM-CurrentControlSet-services-mysql (Service name)-ImagePath
Lecture 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
Run the command again: net start MySQL. If the parameters are correctly configured and the tmpdir path already exists, the startup is successful;
Otherwise, an error is reported. Modify the parameters and restart.
NOTE: For the data DIRECTORY extracted from the datadir installation package, the tmpdir directory must exist. when mysql is started, it will check whether the directory exists and will not be created automatically.
Start, stop, and uninstall the MySQL Service
Run:
Start:Net start MySQL
Stop:Net stop MySQL
Uninstall:SC delete MySQL