建立远程访问用户12345GRANT ALL PRIVILEGES ON *.* TO 'YOURUSER'@'%' IDENTIFIED BY 'YOURPASSWORD' WITH GRANT OPTION;FLUSH PRIVILEGES;#查看结果:SELECT * from information_schema.user_privileges where grantee like "'YOURUSER'%";
配置my.cnf,通常是/etc/mysql/my.cnf,找到并注释掉下面语句
|
|
重启服务器
Bonus-Tip: Revoke Access
If you accidentally grant access to a user, then better have revoking option handy.
|
|
Its better to check information_schema.user_privileges table after running REVOKE command.
If you see USAGE privilege after running REVOKE command, its fine. It is as good as no privilege at all. I am not sure if it can be revoked.