The previous management of MySQL database is basically local, today learned a relatively light, do not need to install, directly unzip the available graphical interface management tools Heidisql (: Link: http://pan.baidu.com/s/1nvuP2Et Password: vry9), The interface is very concise.
1) Solve 10061 problems
When I follow the prompts to remotely connect to the MySQL database under the Linux system, the first encounter is the following problem:
650) this.width=650; "Src=" https://s3.51cto.com/wyfs02/M02/95/83/wKioL1kV2JSSSTc6AACm0Qxqxls425.jpg-wh_500x0-wm_ 3-wmp_4-s_1327722656.jpg "title=" 10061.jpg "alt=" Wkiol1kv2jssstc6aacm0qxqxls425.jpg-wh_50 "/>
Figure 1: ' 10061 ' question
Thus, in accordance with the error code prompts to find information, many online platforms are said to be MySQL permissions problem, need to give the root user sufficient permissions to allow the root user name from an IP address or any IP address of the host to connect to the MySQL database.
First look for user information in MySQL:
Select Host,user from User;
The information in the user table in MySQL is as follows:
650) this.width=650; "Src=" https://s3.51cto.com/wyfs02/M02/95/83/wKiom1kV2ijys3dMAAA5ninESLw158.jpg-wh_500x0-wm_ 3-wmp_4-s_675121401.jpg "title=" user.jpg "alt=" Wkiom1kv2ijys3dmaaa5nineslw158.jpg-wh_50 "/>
Figure 2:root User's host permissions
It can be known that the root user is the 127.0.0.1 is the local connection permission, also has "%" that allows any IP address of the host remote connection MySQL permissions, and then connect again, but still display ' 10061 ' error, so, continue to check the information. A netizen tells you that you need to modify the configuration code of one of the MySQL configuration files, that is, "bind-address = ..." in the My.ini file. Modified to "0.0.0.0", thus, operation. With the "Locate" command, the My.ini file is not found and continues to understand that this property is configured in a file named "My.cnf".
# VIM/ETC/MYSQL/MY.CNF
650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M01/95/83/wKioL1kV3DqxcXJvAABcdK1xxJ0497.jpg-wh_500x0-wm_ 3-wmp_4-s_158977437.jpg "title=" bindaddr.jpg "alt=" Wkiol1kv3dqxcxjvaabcdk1xxj0497.jpg-wh_50 "/>
Figure 3: Modify MY.CNF
Save after modification, and then execute the restart command:
Service MySQL Restart
To continue the remote connection operation, the results are as follows:
650) this.width=650; "Src=" https://s5.51cto.com/wyfs02/M02/95/83/wKioL1kV3SrTEwcTAACJKN5kcjY773.jpg-wh_500x0-wm_ 3-wmp_4-s_1168657194.jpg "title=" 1045.jpg "alt=" Wkiol1kv3srtewctaacjkn5kcjy773.jpg-wh_50 "/>
Figure 4: Remote connection After modifying Bind-address configuration properties
2) Solve 1045 problems
As shown in Figure 2 and Figure 4, although the root user's host property is "%", but in the remote connection, there will be errors, error code 1045, and online many netizens and bloggers, are in this case, you can connect successfully, so very confused, why still will appear wrong. After thinking for a long time, I think, it is possible that I have given root user rights for a longer period, need to re-refresh, so, again to the root user to give the relevant permissions.
Grant all on * * to [e-mail protected] "%" identified by "root user login password"; Flush privileges;//Refreshes the permissions to make it effective. Mysql> exit; Service MySQL restart//restart MySQL service
After executing the above command, the connection is successful again by connecting remotely.
650) this.width=650; "Src=" https://s5.51cto.com/wyfs02/M00/95/83/wKiom1kV4EOC4tupAAClGqugu-8336.jpg-wh_500x0-wm_ 3-wmp_4-s_225358841.jpg "title=" root.jpg "alt=" Wkiom1kv4eoc4tupaaclgqugu-8336.jpg-wh_50 "/>
Figure 5:root User remote connection results (1)
650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M01/95/83/wKioL1kV4JryAiQ2AAGP_ohEj2s473.jpg-wh_500x0-wm_ 3-wmp_4-s_2033824874.jpg "title=" root2.jpg "alt=" Wkiol1kv4jryaiq2aagp_ohej2s473.jpg-wh_50 "/>
Figure 6:root User remote connection results (2)
The above is the problem I encountered this evening and solve the process, by the way to record, for future encounter similar problems can be consulted, if your problem and I, you can refer to the above methods, specific problems have to be specific analysis, it is possible that the above methods can not solve your problem, then you have to find another way. night!!!
Stay up again, shit!!!.
This article from "Coder Change Life" blog, reproduced please contact the author!
Workaround for MySQL remote connection when 10061 and 1045 errors occur