Error phenomena
2003-cant connect to MySQL server on ... 10061
Workaround
[Email protected]:/usr/bin# mysql-uroot-p Enter Password: Welcome to the MySQL Monitor. Commands End With; or \g. Your MySQL Connection ID is 8 Server version:5.7.17-0ubuntu0.16.04.1 (Ubuntu) Copyright (c), Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of the Oracle Corporation and/or its Affiliates. Other names trademarks of their respective Owners. Type ' help ', ' or ' \h ' for help. Type ' \c ' to clear the current input statement. |
mysql> Grant all privileges On * * to [email protected] "%" identified by "root"; query OK, 0 rows affected, 1 warning (0.03 sec) mysql> exit |
[email protected]:/etc/mysql# grep-r address mysql.conf.d/mysqld.cnf:bind-address = 127.0.0.1 |
[Email protected]:/etc/mysql# VI mysql.conf.d/mysqld.cnf Bind-address = 127.0.0.1 This statement shows that the local IP address is bound so that adding permissions is useless. I tried to block it so that he became "#bind-address = 127.0.0.1". |
[Email protected]:/etc/mysql# sudo/etc/init.d/mysql Restart |
Get
Use Navicat to link to MySQL server in Ubuntu