不通过ssh通道,mysql 授予远程连接直接访问
语句
GRANT ALL PRIVILEGES ON *.* TO [email protected]‘%‘ IDENTIFIED BY ‘!DSJdg!‘ WITH GRANT OPTION;
后来revoke 一下,错误。
重新grant 出现错误。
mysql> GRANT ALL PRIVILEGES ON *.* TO [email protected]‘%‘ 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 [email protected]‘%‘ identified by ‘!DSJdg!‘;
时间: 2024-10-14 16:58:09