0

My database.php :

class DATABASE_CONFIG {
    public $default = array(
        'datasource' => 'Database/MySql',
        'persistent' => false,
        'host' => 'localhost',
        'login' => '',
        'password' => '',
        'database' => 'cake_database',
        'schema' => '',
        'prefix' => '',
        'encoding' => 'utf8'
    );

    public $test = array(
        'datasource' => 'Database/MySql',
        'persistent' => true,
        'host' => 'localhost',
        'login' => '',
        'password' => '',
        'database' => 'cake_database',
        'prefix' => '',
        //'encoding' => 'utf8',
    );
}

Shows this notice : CakePHP is NOT able to connect to the database.Database connection "Mysql" is missing, or could not be created.

Please help...........

marian0
  • 3,336
  • 3
  • 27
  • 37
Monzur
  • 11
  • 4

1 Answers1

0

public $default = array( 'datasource' => 'Database/MySql', 'persistent' => false, 'host' => 'localhost', 'login' => 'root', 'password' => '', 'database' => 'cake_database', 'schema' => '', 'prefix' => '', 'encoding' => 'utf8' );

Mysql default login is root and password empty,

If you have change it, you must enter the user and the password to access database..

It's just because cakephp failed connect to mysql..

Onesinus Saut
  • 314
  • 5
  • 18