问题:
创建数据库报错:Access denied for user 'root'@'%' to database 'xxx
(推荐教程:mysql数据库学习教程)
解决方法:
首先进入mysql命令行,输入下面命令:
grant all on xxxx.* to 'root'@'%' identified by 'password' with grant option;
www#gaodaima.com来源gaodai$ma#com搞$代*码网搞代码
xxxx代表创建的数据库,password为用户密码,在此为数据库的密码。
来源:搞代码网:原文地址:https://www.gaodaima.com