我正在使用 MySQL 8.0 设置开发服务器,并尝试从我的笔记本电脑以 root 身份远程连接 Workbench。这让我访问被拒绝错误,因此,尝试应用其他地方提供的解决方案,即授予所有特权......,我仍然没有到达那里。自从发布这些解决方案后,可能发生了一些变化(例如 [ Enable remote MySQL connection: ERROR 1045 (28000): Access denied for user)。
从服务器:
C:\Program Files\MySQL\MySQL Server 8.0\bin>mysql -uroot -ppassword
mysql> grant all privileges on *.* to 'root'@'%' identified by 'password';
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual
that corresponds to your MySQL server version for the right syntax to use
near 'identified by 'password'' at line 1
如果我删除消息抱怨的部分:
mysql> grant all privileges on *.* to 'root'@'%';
ERROR 1410 (42000): You are not allowed to create a user with GRANT
有什么建议吗?
谢谢!
R。