不通过ssh通道,mysql 授予远程连接直接访问
语句
GRANT ALL PRIVILEGES ON *.* TO root@'%' IDENTIFIED BY '!DSJdg!' WITH GRANT OPTION;
后来revoke 一下,错误。
重新grant 出现错误。
mysql> GRANT ALL PRIVILEGES ON *.* TO root@'%' IDENTIFIED BY '!DSJdg!' WITH GRANT OPTION;
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
----------------------
解决方案:
删除一些
delete from user where user="root" and host="%";
重新赋予权限grant select, insert, update, delete, create,drop on *.* to root@'%' identified by '!DSJdg!';