Enable remote MySQL connection: ERROR 1045 (28000): Access denied for user

前端 未结 12 2034
北海茫月
北海茫月 2020-11-22 10:06

MySQL 5.1.31 running on Windows XP.

From the local MySQL server (192.168.233.142) I can connect as root as follows:

>mysql --host         


        
12条回答
  •  北海茫月
    2020-11-22 11:13

    I was getting the same error after granting remote access until I made this:

    From /etc/mysql/my.cnf

    In newer versions of mysql the location of the file is /etc/mysql/mysql.conf.d/mysqld.cnf

    # Instead of skip-networking the default is now to listen only on
    # localhost which is more compatible and is not less secure.
    #bind-address           = 127.0.0.1
    

    (comment this line: bind-address = 127.0.0.1)

    Then run service mysql restart.

提交回复
热议问题