-
1 执行
-
mysql> GRANT ALL PRIVILEGES ON *.* TO 'USERNAME'@'%' IDENTIFIED BY 'PASSWORD' WITH GRANT OPTION;
注意: 这里的USERNAME是你的数据库账户,PASSWORD是你的数据库密码
例如: mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'root' WITH GRANT OPTION;
- 执行:
mysql> FLUSH PRIVILEGES;
3 退出mysql命令行,