CakePHP问题:无法连接数据库,可能是什么原因?

时间:2011-09-15 04:33:04

标签: php mysql database cakephp cakephp-1.3

错误的第一行=>

Access denied for user 'user_user'@'real.superdnssite.com' (using password: YES) [CORE/cake/libs/model/datasources/dbo/dbo_mysql.p

database.php =>

var $default = array(
    'driver' => 'mysql',
    'persistent' => false,
    'host' => 'a.b.c.d',
    'login' => 'user_user',
    'password' => 'password',
    'database' => 'database_name',
    'prefix' => '',
);

var $test = array(
    'driver' => 'mysql',
    'persistent' => false,
    'host' => 'a.b.c.d',
    'login' => 'user_user',
    'password' => 'password',
    'database' => 'database_name',
    'prefix' => '',
);

这可能是什么原因?它是用于错误的密码还是没有数据库或IP地址?

1 个答案:

答案 0 :(得分:0)

尝试使用:

'datasource' => 'Database/Mysql'