2013-02-10 110 views
0

我已經開始在Mac上運行grails 2.2.0和mysql(mysql版本14.14 Distrib 5.6.10,對於osx10.7(x86_64)使用EditLine包裝器)的錯誤訪問被拒絕錯誤OS X.Grails 2.2.0 mysql訪問權限

Caused by: java.sql.SQLException: Access denied for user 'nfuser'@'localhost' (using password: YES)

示例代碼

 
dataSource { 
    pooled = true 
    driverClassName = "com.mysql.jdbc.Driver" 
    username = "nfuser" 
    password = "nfuser" 
    dialect = org.hibernate.dialect.MySQL5InnoDBDialect 
} 
.. 
    development { 
     dataSource { 
      dbCreate = "create-drop" // one of 'create', 'create-drop', 'update', 'validate', '' 
      url = "jdbc:mysql://localhost:3306/nf_dev" 
     } 
    } 

通常的贈款和運行Grails的前分貝創建。

GRANT all ON nf_dev.* TO 'nfuser'@'%' identified by 'nfuser';

測試了一個全新的項目,當然它的工作..想法?

/S

+2

你有可能會改寫'dataSource.password'任何'grails.config.locations'外部配置文件? – 2013-02-10 10:14:37

+0

是的,當然我有/etc/nf.properties包含密碼。 Duuhhhh。在這裏詢問幫助我直接找到它。留下這個問題作爲提醒像我這樣的其他愚蠢的吸盤;-) – 2013-02-10 10:22:38

回答

0

Duuh,在dataSource.password外部屬性文件覆蓋..