这些是我的命令:
mysql> Grant all privileges on my_db to me@'localhost';
Query OK, 0 rows affected (0.00 sec)
mysql> select user, host, Create_priv from mysql.user;
+------------------+-----------+-------------+
| user | host | Create_priv |
+------------------+-----------+-------------+
| root | localhost | Y |
| root | ubuntu | Y |
| root | 127.0.0.1 | Y |
| root | ::1 | Y |
| | localhost | N |
| | ubuntu | N |
| debian-sys-maint | localhost | Y |
| me | localhost | N |
+------------------+-----------+-------------+
8 rows in set (0.00 sec)
好吧,我们可以看到'我'仍然无法创建表格。 你能帮我理解如何授予我'localhost'所有权限吗?
答案 0 :(得分:0)
如果要授予所有全局级权限,请使用此查询 -
GRANT ALL PRIVILEGES ON *.* TO 'me'@'localhost';