我在vmware win XP中安装了mysql 5.6.20,同时尝试使用MYSql Workbench从主机[windows 7]连接数据库。在vmware中启用了NAT。还有DHCP
无法使用root用户连接到XXX.XXX.XXX.XXX上的sql
提前谢谢
答案 0 :(得分:2)
最后得到了答案,只需在Mysql中添加一个具有所有权限的新用户,并在Mysql工作台中建立连接。
mysql> CREATE USER 'randxy'@'localhost' IDENTIFIED BY 'root_password';
mysql> GRANT ALL PRIVILEGES ON *.* TO 'randxy'@'localhost'
-> WITH GRANT OPTION;
mysql> CREATE USER 'randxy'@'%' IDENTIFIED BY 'password';
mysql> GRANT ALL PRIVILEGES ON *.* TO 'randxy'@'%'
-> WITH GRANT OPTION;