我真的很困惑。我有这个用户可以使用。和两个数据库的权限。
SELECT CURRENT_USER();
输出,
+---------------------------+
| CURRENT_USER() |
+---------------------------+
| lovemarks_admin@localhost |
+---------------------------+
1 row in set (0.00 sec)
当我检查此用户授予时 -
+------------------------------------------------------------------------------------------------------------------------+
| Grants for lovemarks_admin@localhost |
+------------------------------------------------------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO 'lovemarks_admin'@'localhost' IDENTIFIED BY PASSWORD '*****************************************' |
| GRANT ALL PRIVILEGES ON `lovemarks`.* TO 'lovemarks_admin'@'localhost' |
| GRANT ALL PRIVILEGES ON `lovemarks_rwd`.* TO 'lovemarks_admin'@'localhost' |
+------------------------------------------------------------------------------------------------------------------------+
3 rows in set (0.00 sec)
然而,当我使用show数据库时,我得到了这个。
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| lovemarks |
| test |
+--------------------+
3 rows in set (0.00 sec)
我错过了对lovemarks_rwd的访问权限。我尝试过刷新权限,重启服务器等等。我没有更多的线索。
谢谢!