php - Cake is NOT able to connect to the database. XAMPP

504

I'm developing on XAMPP 1.8.1 and running into issues with CakePHP not being able to connect to the database. I've looked around a bit, and others have suggested making sure pdo is enabled, and it is. I know my database settings are correct. I've checked and rechecked them, but I'm still getting:

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

I've set up CakePHP multiple times before, even with XAMPP, and I've never run into this issue.

My database settings are as follows:

public $default = array(
    'datasource' => 'Database/MySQL',
    'persistent' => false,
    'host' => 'localhost',
    'login' => 'cakeuser',
    'password' => '*****',
    'database' => 'cake',
    'prefix' => '',
    //'encoding' => 'utf8',
);

Any suggestions?

648

Answer

Solution:

Check the output of your phpinfo (). Is there a row titled PDO drivers? What does it say?

People are also looking for solutions to the problem: php - Return instead of echo in WP plugin

Source

Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.