2012-04-11 71 views
1

這就奇怪了,我的database.yml我有以下我必須用根生產

production: 
    adapter: mysql2 
    encoding: utf8 
    reconnect: false 
    database: ajhezaty_production 
    pool: 5 
    user: myname 
    password: "mygreatpassword" 
    socket: /tmp/mysql.sock 
    host: mysql.asdf.com 
    timeout: 500 

,當我在生產模式

11/lib/mysql2/client.rb:53:in `connect': Access denied for user 'root'@'c-71- (using password: YES) (Mysql2::Error) 

爲什麼用它的根在本地運行軌道服務器!我在database.yml中有不同的用戶名

當我訪問client.rb並硬編碼usernae它的作品!

+0

試過這個嗎? http://stackoverflow.com/questions/8675489/mysql2error-access-denied-for-user-rootlocalhost-using-password-no – 2012-04-11 07:11:17

+0

我看到了。它沒有幫助。 – aaalsubaie 2012-04-11 07:16:02

回答

3

嘗試用戶名而不是用戶;-)

+0

超級英雄!它工作:)謝謝 – aaalsubaie 2012-04-11 08:32:57