Friday, May 17, 2013

Cake is NOT able to connect to the database. Database connection "Mysql" is missing, or could not be created.

Hello again,

I installed XAMP for PHP.
APACHE and MYSQL are working ok.
I installed CAKEPHP. And I changed files required by Cake, php.ini,
database.php. core.php

I received the following message:

"Your version of PHP is 5.2.8 or higher.

Your tmp directory is writable.

The FileEngine is being used for core caching. To change the config
edit APP/Config/core.php

Your database configuration file is present.

Cake is NOT able to connect to the database.

Database connection "Mysql" is missing, or could not be created.

DebugKit plugin is present"


Database.php looks like:
class DATABASE_CONFIG {

public $default = array(
'datasource' => 'Database/Mysql',
'persistent' => false,
'host' => 'localhost',
'login' => 'gabriel',
'password' => 'gabi62#',
'database' => 'cake',
'prefix' => '',
//'encoding' => 'utf8',
);

public $test = array(
'datasource' => 'Database/Mysql',
'persistent' => false,
'host' => 'localhost',
'login' => 'gabriel',
'password' => 'gabi62#',
'database' => 'test_cake',
'prefix' => '',
//'encoding' => 'utf8',
);
}

php.ini looks like:
extension=php_bz2.dll
extension=php_curl.dll
extension=php_mbstring.dll
extension=php_exif.dll
;extension=php_fileinfo.dll
extension=php_gd2.dll
extension=php_gettext.dll
;extension=msql.dll
;extension=php_gmp.dll
;extension=php_intl.dll
;extension=php_imap.dll
;extension=php_interbase.dll
;extension=php_ldap.dll
extension=php_mssql.dll
;extension=php_mbstring.dll
;extension=php_exif.dll ; Must be after mbstring as it depends on
it
extension=php_mysql.dll
extension=php_mysqli.dll
;extension=php_oci8.dll ; Use with Oracle 10gR2 Instant Client
;extension=php_oci8_11g.dll ; Use with Oracle 11gR2 Instant Client
;extension=php_openssl.dll
;extension=php_pdo_firebird.dll
extension=php_pdo_mysql.dll
extension=php_pdo.dll
;extension=php_pdo_mssql.dll
;extension=php_pdo_oci.dll
;extension=php_pdo_odbc.dll
;extension=php_pdo_pgsql.dll
extension=php_pdo_sqlite.dll
;extension=php_pdo_sqlite_external.dll
;extension=php_pgsql.dll
;extension=php_pspell.dll
;extension=php_shmop.dll

I set up the rights in Mysql for the user gabriel

Please, tell me where I am wrong?

Thank you in advance

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.

No comments: