MySQL installation files are divided into two types, one in MSI format and one in ZIP format.
After the installation in MSI format, do not be busy to start MySQL, we also need to modify the configuration file (if not configured, after the start of the error will appear in the picture Oh!). : Error 2 system cannot find file), mysql-5.6.1x default profile is D:\\mysql\mysql Server 5.6\my-default.ini, or create a My.ini file yourself,
In which the configuration () is modified or added:
[Mysqld]
Basedir=d:\mysql\mysql Server 5.6 (MySQL directory)
Datadir=d:\mysql\mysql Server 5.6\data (MySQL directory \data)
Run cmd as administrator (be sure to run as administrator, or not have enough permissions),
Input: cd D:mysql\mysql Server 5.6\bin into the bin folder of MySQL (regardless of whether the environment variable has been configured, but also to enter the Bin folder, or after the start of the service will still report error 2)
Enter Mysqld-install (if run without administrator, there will be an error due to insufficient permissions: Install/remove of the Service denied!)
The installation was successful.
After the installation is successful, start the service, continue to enter in cmd: net start MySQL, the service started successfully!
D:\MySQL\MySQL Server 5.6\my.ini or My-default.ini file modification
# These is commonly set, remove the # and set as required.
Basedir=d:\mysql\mysql Server 5.6
Datadir=d:\mysql\mysql Server 5.6\data
Port = 3306
server_id = Gradven
#日志路径
Log_bin = D:\MySQL\MySQL Server 5.6\log
Go to MySQL
C:> mysql-u Root
Set Password
mysql> Update Mysql.user Set Password=password (' root ') where user= ' root ';mysql> flush privileges;
If you want to listen to the external network, in addition to My.ini to set Bind-address, also set permissions.
Mysql> Grant all privileges on * * to [e-mail protected] "%" identified by ' MyPassword ' with Grant option;mysql> flush privileges;
Where% means any address can be logged in, you can also specify a specific IP, such as "192.168.1.102".
Windows install MySQL Note point