导入sql文件访问被拒绝时出现mysql错误

时间:2017-03-30 17:32:32

标签: mysql

如标题所示:

用户访问被拒绝' xxxx' @' localhost'到数据库' dbname'

当我尝试导入如下的mysql文件时:

mysql -u xxxx -p dbname< mysql_update

如果我使用xxxx在数据库accessin中执行show特权,我会得到以下结果:

+------------------------------------------------------------------------------------+
| Grants for tacticalcustom@localhost                                                |
+------------------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO 'xxxx'@'localhost'                                           |
| GRANT ALL PRIVILEGES ON `dbname`.* TO 'xxxx'@'localhost'                           |
| GRANT ALL PRIVILEGES ON `dbname`.* TO 'xxxx'@'localhost'                           |
| GRANT ALL PRIVILEGES ON `dbname`.`dbname` TO 'xxxx'@'localhost'                    |
+------------------------------------------------------------------------------------+

我错过了什么吗?

0 个答案:

没有答案