首页 > IT职业 > IT生活 > mysql创建数据库报错了怎么办

问题:
创建数据库报错:Access denied for user 'root'@'%' to database 'xxx
(推荐教程:mysql数据库学习教程)
解决方法:
首先进入mysql命令行,输入下面命令:
grant all on xxxx.* to 'root'@'%' identified by 'password' with grant option;
xxxx代表创建的数据库,password为用户密码,在此为数据库的密码。
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/1817/viewspace-2832621/ ,如需转载,请注明出处,否则将追究法律责任。