[英]Rails 3.2 - Production server is not allowed to connect to this MySQL server (Mysql2::Error)
我已經創建了一個新服務器來托管Rails 3.2應用程序,並將MySQL服務器托管在同一服務器上。
我不斷收到“ xxxxx-xxxxx.linode.com”,不允許連接到該MySQL服務器(Mysql2 :: Error)
我已經檢查了所有的配置,這似乎是正確的。 我可以使用mysql命令sequal pro訪問mysql服務器,並且還可以執行rake db:migrate,如下所示:
bundle exec rake db:migrate RAILS_EV=production
我正在使用乘客,這是我的database.yml
production:
adapter: mysql2
encoding: utf8
reconnect: false
database: nst_production
pool: 5
host: localhost
username: root
password: password
timeout: 5000
有任何想法嗎 ?
您最好嘗試通過套接字連接。
production:
adapter: mysql2
encoding: utf8
reconnect: false
database: nst_production
pool: 5
socket: /tmp/mysql.sock
username: root
password: password
timeout: 5000
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.