报错:
GRANT ALL PRIVILEGES ON test.* TO ‘root’@‘%’ WITH GRANT OPTION
解决方案
- 赋权
GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION;
FLUSH PRIVILEGES;
2.创建用户,再赋权
CREATE USER 'root'@'%' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%';
FLUSH PRIVILEGES;
结果:
CREATE USER ‘root’@‘%’ IDENTIFIED BY ‘password’
OK
时间: 0.016s
GRANT ALL PRIVILEGES ON . TO ‘root’@‘%’
OK
时间: 0.003s
FLUSH PRIVILEGES
OK
时间: 0.003s