First, configure the MySQL database
1, unzip the green version of MySQL, and renamed to mysql5.7, such as
Compare the previous version of 5.6 with less data directory (storage) and My-default.ini files (configuration information)
Second, installation Services
1, run cmd (Administrator version, otherwise no permissions), such as
2, for the new mysql5.7 without the data directory, we need to run the command to create
3, run the command Mysqld–install installation services, such as:
If you don't need MySQL, just run mysqld–remove to remove it, such as
3. Run the net start MySQL startup service, such as
If you need to configure whether booting up MySQL can be configured within the Windows service.
Third, client testing
1, mysql–uroot–p such as
Iv. Modify username and password
1. Run the command
Use MySQL;
UPDATE user SET Authentication_string=password (' 123456 ') where user= ' root ';
FLUSH privileges;
Such as:
2, re-login, Run command mysql-uroot-p123456
Five, the configuration code is UTF-8
1. View the default encoding
2, in the root directory of the mysql5.7, create a new My.ini file, (after 5.7 without this file, their own new), such as:
When the MySQL service program starts, it automatically reads the My.ini to get the configuration parameters, including the encoding
2. Edit My.ini
Under the [MYSQLD] node, configure the server-side encoding to add 2 items
Character_set_server=utf8
[MySQL] node, this is the configuration of the client information
We also add the [MySQL] node and configure the encoding UTF8
[MySQL]
Default-character-set=utf8
Together such as:
Six, test query
1, modify the configuration file must first restart the service
2, the normal use of the root user login
3. Run command show variables like "%character%" to view system character set variables such as:
Configuring the MySQL Database