mysql创建数据库报错

错误代码是Access denied for user 'root'@'%' to database 'xxx

解决方法:

进入mysql命令行,输入下面命令:
grant all on xxxx.* to 'root'@'%' identified by 'password' with grant option;  
  
xxxx代表创建的数据库;  
password为用户密码,在此为数据库的密码 

posted @ 2020-12-23 00:25  escape丶丶  阅读(385)  评论(0)    收藏  举报