所以我试图从mysql中导出一个架构/数据库,我收到了一个奇怪的错误。
我还运行了几个授权命令(见下文),我认为这些命令应该足以让我导出数据。在MySQLWorkbench上,我以grand命令中提到的用户身份登录。
任何想法我可能做错了什么?非常感谢
错误:
Unhandled exception: Error querying security information: Error executing 'SELECT * FROM mysql.user WHERE User='mydb' AND Host='myhost.com' ORDER BY User, Host'
SELECT command denied to user 'mydb'@'my-ip-here' for table 'user'.
SQL Error: 1142
授予命令:
mysql> use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> grant all privileges on mydb.* to 'mydb'@'%' identified by 'mypassword';
Query OK, 0 rows affected (0.05 sec)
mysql> grant show databases on *.* to 'mydb'@'%';
Query OK, 0 rows affected (0.01 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.02 sec)
mysql> show grants for 'mydb'@'%';
+--------------------------------------------------------------------------------------------------------------+
| Grants for mydb@% |
+--------------------------------------------------------------------------------------------------------------+
| GRANT SHOW DATABASES ON *.* TO 'mydb'@'%' IDENTIFIED BY PASSWORD 'mypassword' |
| GRANT ALL PRIVILEGES ON `mydb`.* TO 'mydb'@'%' |
+--------------------------------------------------------------------------------------------------------------+