“访问被拒绝"; Rails连接到Mysql时

编程入门 行业动态 更新时间:2024-10-28 06:26:38
本文介绍了“访问被拒绝"; Rails连接到Mysql时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我已经完成了多个地方提到的所有步骤,而且我还从lynda视频教程中学到了东西.我使用Mac 10.7,并安装了rubystack.我创建了数据库,添加并检查了数据库.在这里,您可以再次看到它.

I have did all the procedures as mentioned in several places and I also learned from lynda video tutorial. I used Mac 10.7 and I installed rubystack. I created the databases, add and checked the database.yml here is you can see it again.

development: adapter: mysql2 encoding: utf8 reconnect: false host: localhost database: simplecmsdevelopment pool: 5 username: simple_cms password: maiwandj socket: /tmp/mysql.sock

因此,当我运行rake db:schema:dump时,它会显示以下错误

Therefore, when I run rake db:schema:dump it print the following errors

bash-3.2$ rake db:schema:dump /Applications/rubystack-1.9.3-18/ruby/lib/ruby/gems/1.9.1/gems/bundler-1.5.2/lib/bundler/runtime.rb:220: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777 rake aborted! Access denied for user 'simplecms'@'localhost' (using password: YES) /Applications/rubystack-1.9.3-18/simplecms/config/environment.rb:5:in `' Tasks: TOP => db:schema:dump => environment (See full trace by running task with --trace)

推荐答案

您是否已授予该用户对该数据库的权限?即GRANT ALL PRIVILEGES ON simplecmsdevelopment.* TO simple_cms@localhost;

Have you granted permissions for that user on that database? i.e., GRANT ALL PRIVILEGES ON simplecmsdevelopment.* TO simple_cms@localhost;

更多推荐

“访问被拒绝"; Rails连接到Mysql时

本文发布于:2023-10-16 10:07:17,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1497262.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:连接到   被拒   Rails   quot   Mysql

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!