gpt4 book ai didi

mysql - 错误 1064 (42000) : You have an error in your SQL syntax in Ruby on Rails

转载 作者:行者123 更新时间:2023-11-29 12:36:44 24 4
gpt4 key购买 nike

尝试在 RUBY ON RAILS 中使用 devise-pundit 示例应用程序时出现语法错误

mysql> grant all privileges on rails-devise-pundit_development to 'pavuluri'@'localhost' identified by '';

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 '-devise-pundit_development to 'pavuluri'@'localhost' identified by ''' at line 1

Database Name : rails-devise-pundit_development(default).

数据库名称中不允许使用rails吗? (保留字)

请提出建议

不知道信息是否足够。

最佳答案

这应该有效:

GRANT ALL PRIVILEGES ON `rails-devise-pundit_development`.* TO pavuluri@localhost  IDENTIFIED BY 'PASSWORD';

或者:

GRANT ALL PRIVILEGES ON `rails-devise-pundit_development`.* TO pavuluri@'%' IDENTIFIED BY 'PASSWORD';

关于mysql - 错误 1064 (42000) : You have an error in your SQL syntax in Ruby on Rails,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26668327/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com