简体   繁体   中英

CakePHP question: Can't connect to database, what can be the reason?

First line of the error =>

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' => '',
);

What can be the reason for this ? Is it for wrong password or for no database or for ip address ?

尝试使用:

'datasource' => 'Database/Mysql'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM