本文主要是介绍root赋权,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
报错:
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
这篇关于root赋权的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!