Installation and configuration of MySQL
1) MySQL configuration file modification
mysql-5.7.11 default profile is in Mysql/my-default.ini, or create a My.ini file yourself
----------------------------------------------------------------------------------------------
My.ini reference Content
[mysqld]
Basedir= "D:/program files/mysql-5.7.15-winx64"
Datadir= "D:/program Files/mysql-5.7.15-winx64/data"
port=3306
Default-character-set=utf8
Default-storage-engine=innodb
Character_set_filesystem=binary
[Client]
port=3306
Default-character-set=utf8
[MySQL]
Default-character-set=utf8
--------------------------------------------------------------------------------------------
2) Configure Environment variables
--------------------------------------------------------------------------------------------
Configure the MySQL bin directory path to path (not specifically described)
--------------------------------------------------------------------------------------------
3) Install MySQL
--------------------------------------------------------------------------------------------
Open cmd, run: mysqld-install
Run Services.msc A look, there really is a service called MySQL
--------------------------------------------------------------------------------------------
4) Initialize the data directory
--------------------------------------------------------------------------------------------
Open the MySQL installation directory, and if there is no Data folder, enter it in cmd:mysqld--initialize-insecure
Generate a user data with root as the user name and a blank password
Attention:
mysqld--initialize automatic generation of random passwords Root User , You cannot log on without a password .
The Data folder is not empty and cannot execute this command. You can delete the Data folder and re-execute the step-up instruction
--------------------------------------------------------------------------------------------
Enter select version () in MySQL to view MySQL version information
5) Turn on the MySQL service and login to set the password
-------------------------------------------------------------------------------------------
Start the MySQL service
CMD input:net start MySQL
Log in to MySQL
CMD input: Mysql-u root-p
Password: Press ENTER directly here
Set Password
Set password for [email protected] = password (' new password ');
------------------------------------------------------------------------------------------
Specific reference:
Http://dev.mysql.com/doc/refman/5.7/en/data-directory-initialization-mysqld.html
How to remove MySQL
1) Close the service
net stop MySQL
2) Delete Service items
C:\mysql\bin\mysqld-nt.exe-remove
3) Delete the corresponding folder
MySQL Compressed edition installation configuration