授权用户远程访问数据库
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'password';
FLUSH PRIVILEGES;
授权用户远程访问数据库(带管理权限)
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'password'WITH GRANT OPTION;
FLUSH PRIVILEGES;
取消授权
REVOKE ALL ON *.* FROM 'root'@'%';
FLUSH PRIVILEGES;
版权属于:一名宅。
本文链接:https://zhaiyiming.com/archives/mysql-remote-access.html
转载时须注明出处及本声明