【发布时间】:2013-08-27 03:49:33
【问题描述】:
我正在尝试将在我的 Mac 上运行的 rails 应用程序连接到在我的 Windows 7 机器上运行的 MySQL。它们都在我家的同一个网络上,我可以从我的 Mac ping 我的 Windows 机器。
尝试执行rake db:create 我得到这个错误:
Host 'MACMINI-459400' is not allowed to connect to this MySQL server
Couldn't create database for {"adapter"=>"mysql2", "encoding"=>"utf8", "reconnect"=>false, "database"=>"MySite_development", "pool"=>5, "username"=>"root", "password"=>"password", "host"=>"10.0.0.33"}, charset: utf8, collation: utf8_unicode_ci
(if you set the charset manually, make sure you have a matching collation)
这是我目前的database.yml 内容
development:
adapter: mysql2
encoding: utf8
reconnect: false
database: MySite_development
pool: 5
username: root
password: password
host: 10.0.0.33
我尝试关闭 Windows 防火墙,但没有成功。我怎样才能让这两个连接起来?
【问题讨论】:
-
确保你已经移除了mysql中的连接限制?
标签: mysql ruby-on-rails mysql2