你检查一下有没有填错
Server Host:localhost   Port:3306
Username:root
Password:*******
Default Schema:test

解决方案 »

  1.   

    为什么我的 Server Host写的是我的IP地址,而不是localhost就不行呢??
      

  2.   

    mysql默认的是本地主机是localhost,对应的IP地址就是127.0.0.1,所以你用你的IP地址登录会出错,如果你想用你的IP地址登录就要先进行授权用grant命令。
    mysql>grant all on *.* to [email protected] identified by "123456";说明:grant 与on 之间是各种权限,例如:insert,select,update等
    on 之后是数据库名和表名,第一个*表示所有的数据库,第二个*表示所有的表
    root可以改成你的用户名,@后可以跟域名或IP地址,identified by 后面的是登录用的密码,可以省略,即缺省密码或者叫空密码。