mysql - 无法在 MySQL 中对用户进行 GRANT SELECT
问题描述
我最初发布了一个关于为什么我在这里收到语法错误消息的问题。然后我创建了用户usermail
(我承认我误用了IDENTIFIED BY
,但我认为在这种情况下并不重要:
mysql> CREATE USER 'usermail'@'127.0.0.1' IDENTIFIED BY 'usermail';
Query OK, 0 rows affected (0.02 sec)
然后我重试了我最初尝试运行的内容。
mysql> GRANT SELECT ON servermail.* TO 'usermail'@'127.0.0.1' IDENTIFIED BY 'mailpassword';
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IDENTIFIED BY 'mailpassword'' at line 1
mysql> GRANT SELECT ON servermail.* TO 'usermail' IDENTIFIED BY 'mailpassword';
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IDENTIFIED BY 'mailpassword'' at line 1
mysql> GRANT SELECT ON servermail.* TO 'usermail'@'127.0.0.1' IDENTIFIED BY 'mailpassword';
我仍然收到完全相同的错误。我的问题怎么重复了?还是我没有正确遵循指示?
解决方案
推荐阅读
- arrays - 使数组左边部分等于右边部分的最小操作
- python - Python Discord 机器人问题
- javascript - 如何编写脚本来检查印象笔记中的所有待办事项
- python - Django 用户令牌未得到创建它的用户的身份验证
- javascript - 地图多次返回数组的项目
- python - 将第二个图表添加到 Dash app.layout 的问题
- python - 为什么 QTreeview 项目类在拖放事件后发生了变化?
- python - Python/Django '类型对象不可迭代' Django Rest Framework (DRF)
- vue.js - 如果有人点击太快,如何防止不必要的点击?
- calculator - 在 Pascal 中使用大小写的添加菜单