小春BOOK

导航

统计

mysql----------------------------------------问题集锦

1、ERROR 1130: Host 192.168.88.160 is not allowed to connect to this MySQL server

  1)改表法。可能是你的帐号不允许从远程登陆,只能在localhost。

    mysql -u root -p

    mysql>use mysql;

    mysql>update user set host = ‘%' where user =’root’;

    mysql>flush privileges;

    mysql>select host,user from user where user=’root’;

  现在就可以连接了!

  2)授权法。

    如想myuser使用mypassword从任何主机连接到mysql服务器:

    GRANT ALL PRIVILEGES ON *.* TO ‘myuser’@'%’ IDENTIFIED BY ‘mypassword’ WITH GRANT OPTION;

    如想允许用户myuser从ip为192.168.1.3的主机连接到mysql服务器,并使用mypassword作为密码:

    GRANT ALL PRIVILEGES ON *.* TO ‘myuser’@'192.168.1.3′ IDENTIFIED BY ‘mypassword’ WITH GRANT OPTION;

posted on 2012-01-06 17:47 xiaoc.li 阅读(...) 评论(...) 编辑 收藏