Home >Database >Mysql Tutorial >What is the 10061 error of mysql?
In mysql, the 10061 error refers to the failure to connect to the local service; the reason for this error is that the configuration file or localhost only wants something other than the local IP during the connection, which leads to the failure to connect to the local service. In this case, you can modify the value of "localhost" to the specified value to solve this error.
The operating environment of this tutorial: windows10 system, mysql8.0.22 version, Dell G3 computer.
MySQL10061 error code
Translating the error code prompt of mysql10061 means that the connection to the local service failed, that is to say When connecting, the configuration file or localhost only wants something other than the local ip 12.7.0.01, so the connection to the local service fails.
MySQL10061 error solution
Find its configuration file my.ini in the installation directory of the mysql database and delete it, then win r shortcut key to open and run window. Enter winmysqladmin in the run window and execute it. You will be prompted to enter your user name and password. You can use the default administrator account here.
After logging in, execute the command net start mysql to start the service of the mysql database. After the service is started, you need to check which localhost the mysql database points to. The command is as follows:
select Host,User from user
If it is not 127.0.0.1, find the hosts file in the System32/etc folder under the C drive of the computer and open it. After opening, change the value of localhost to 127.0.0.1. After the modification is completed, save the file and return to the command line. Use the command to refresh a local address and then restart. The command is as follows
flush privileges systemctl stop mysqld systemctl start mysqld
Recommended learning: mysql video tutorial
The above is the detailed content of What is the 10061 error of mysql?. For more information, please follow other related articles on the PHP Chinese website!