是不是你的机器没有开放远程连接阿?

解决方案 »

  1.   

    安装完mysql后,默认为本地主机,ip为127.0.0.1;如果要用其它ip登录的话要先对它授权。例如:
    mysql>grant all on *.* to [email protected] identified by '123456';
    说明:grant 后面跟各种权限例如:select,insert,update,delete.
         on 后面跟所有的数据库(如上*.*)或者指定某个数据库,甚至某个数据库的某个表。
         例如: grant udpate(name,address) on sales.customers to harry.
         ppc为你用192.168.0.1登录的用户名,"123456"为密码。