Install the mysql installation package in WINDOWS
1. download the mysql installation package on the official website (my is 5.6.17) 2: Configure MySQL parameters extract mysql installation package to E:/mysql-5.6.17-winx64 to set system environment variables, add E in Path: /mysql-5.6.17-winx64/bin; 3: modify E:/mysql-5.6.17-winx64/my-default.ini file content such as: [client] # password = your_passwordloose-default-character-set = utf8 --- here is the prefix with loose -, if not added, the error [mysqld] loose-default-character-set = utf8character-set-server = utf8basedir = E:/mysql-5.6.17-winx64/datadir = E:/mysql-5.6.17-winx64/Data/4: Open the command prompt, Go to the % MYSQL_HOME %/bin directory and run the command mysqld-install to install mysql to the windows service. After the execution is successful, the prompt is: E:/mysql-5.6.17-winx64/bin> Service successfully installed. if you want to uninstall the service and execute the command: mysqld-remove 5: But I still encountered a small problem during the installation process. when mysql is started, the following error occurs: system error. System error 1067 occurs. The process stops unexpectedly. Open the username. err file in the % MYSQL_HOME %/data directory, and the mysql error log is recorded in this file. The following message is found: 110327 0:12:02 [ERROR] MySQL: unknown variable 'default-character-set = utf8'. this is a new version bug and is not supported in my. set the character set to utf8 directly in ini. Solution: add loose-6 to the front of default-character-set = utf8: then execute: net start mysql at the command prompt to start mysql and stop the service by entering the command: net stop mysql 7: Enter C:/Users/Administrator> mysql-u root to change the password: mysql> update mysql when logging on for the first time. user set password = PASSWORD ('admin') where User = 'root' mysql> flush privileges 8: Note: Although the preceding method is used to add loose-, mysql does not return an error when it is started. However, garbled characters still occur during data insertion, causing a lot of trouble for me. Mysql> show variables like '% char %'; run the preceding command to view the character set encoding. the following result is displayed: + bytes + | Variable_name | Value | + bytes + | character_set_client | utf8 | character_set_connection | utf8 | character_set_database | latin1 | bytes | binary | bytes | utf8 | | Character_set_server | latin1 | character_set_system | utf8 | character | E:/mysql-5.6.17-winx64/share/charsets/| + character + can be seen character_set_database, character_set_server encoding is the default latin1. Add character-set-server = utf8 under the [mysqld] configuration option, restart the service to enter mysql and view it again: + bytes + | Variable_name | Value | + bytes + | character_set_client | utf8 | character_set_connection | utf8 | character_set_database | utf8 | bytes | binary | utf8 | | character_set_server | utf8 | character_set_system | utf8 | character_sets_dir | E: /mysql-5.6.17-winx64/share/charsets/|