GRANT SELECT, INSERT ON database.* TO 'fjx'@'localhost' IDENTIFIED BY 'Shanmu88'; 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 'database.* TO 'fjx
时间: 2023-03-30 21:04:25 浏览: 143
'@'localhost' IDENTIFIED BY 'Shanmu88';"
这个错误是因为在 GRANT 语句中,不能使用 "database.*" 这样的语法,应该使用具体的数据库名和表名。正确的语法应该是:
GRANT SELECT, INSERT ON mydatabase.* TO 'fjx'@'localhost' IDENTIFIED BY 'Shanmu88';
其中,mydatabase 是你要授权的数据库名。
阅读全文