Remote Mysql access

前端 未结 6 1511
伪装坚强ぢ
伪装坚强ぢ 2020-12-18 15:50

I have problem to connect remote LAN MYSQL. While try following commands it shows the following error.

$ mysql -u root -h 192.168.1.15 -p
mysql>

6条回答
  •  自闭症患者
    2020-12-18 16:17

    Comment the line below in file /etc/mysql/my.cnf

    # bind-address = 127.0.0.1
    

    And add (any)host permission to login(maybe root) on mysql server.

    Hard way: you need insert in mysql.host table...

    Easy way: use MySQL Administrator->User Administration->Choose user->(Right mouse click)Add host->Select "Any host"

    Finally restart server:

    /etc/init.d/mysql restart
    

    PS: Default install aptitude

    mysql version: MySQL 5.1.57-1~dotdeb.0

    Linux Debian 6 Squeeze

提交回复
热议问题