Why Configure Skip-name-resolve?
Because the remote access speed of MYSQL-H${IP} is too slow,
mysql-h172. 16.66. 171 -uroot-p123456
According to the user experience (https://www.cnblogs.com/yjf512/p/3803762.html),
vi/etc/my.cnf
[Mysqld]skip-name-resolve
Restart MySQL, find the remote access MSYQL speed up, solve the problem.
However, new problems have been raised:
However, it is found that msyql (mysql-h127.0.0.1-uroot-p123456) cannot be accessed locally:
[Email protected] ~]# mysql-h127. 0.0. 1 -uroot-interface1045 (28000for' ) Root'@'127.0.0.1' (using password:yes)
You can access it without entering a password (mysql-h127.0.0.1-uroot).
[Email protected] ~]# mysql-h127.0.0.1-Uroot Welcome to the MySQL Monitor. Commands End With; or \g.your MySQL connection ID is 91114Server Version:5.6. *-log MySQL Community Server (GPL) Copyright (c) -, ., Oracle and/or its affiliates. All rights reserved. Oracle isA registered trademark of Oracle Corporation and/or Itsaffiliates. Other names trademarks of their respectiveowners. Type'Help ;'Or'\h' forHelp. Type'\c'To clear the current input statement.mysql>
Workaround:
Reference (http://blog.sina.com.cn/s/blog_759a5a7c01017dj0.html), Reset root password:
[Email protected] ~]#mysql-h127.0.0.1- uroot Welcome to the MySQL Monitor. Commands End With; or \g.your MySQL connection ID is 91114Server Version:5.6. *-log MySQL Community Server (GPL) Copyright (c) -, ., Oracle and/or its affiliates. All rights reserved. Oracle isA registered trademark of Oracle Corporation and/or Itsaffiliates. Other names trademarks of their respectiveowners. Type'Help ;'Or'\h' forHelp. Type'\c'To clear the current input statement.mysql>Use MySQL; Database Changedmysql>Update user Set Password=password ("123456") where user= "root"; Query OK,3Rows Affected (0.06sec) Rows matched:5Changed:3Warnings:0MySQL> flush Privileges; Query OK,0Rows Affected (0.13sec) MySQL> quitBye
[Email protected] ~]#
With mysql-h127.0.0.1-uroot-p123456 access, problem solving.
[Email protected] ~]# mysql-h127.0.0.1-uroot-p123456warning:using A password on the command lineInterfacecan be insecure. Welcome to the MySQL Monitor. Commands End With; or \g.your MySQL connection ID is 2487Server Version:5.6. *-log MySQL Community Server (GPL) Copyright (c) -, ., Oracle and/or its affiliates. All rights reserved. Oracle isA registered trademark of Oracle Corporation and/or Itsaffiliates. Other names trademarks of their respectiveowners. Type'Help ;'Or'\h' forHelp. Type'\c'To clear the current input statement.mysql>
Since the error 1045 (28000) on the Internet is not available on the skip-name-resolve, it took most of the day to solve the problem, so publish this article.
My First Blog on cnblogs!
MySQL on skip-name-resolve causes [email protected](localhost) Access error 1045 (28000) Errors Solution