CakePHP: Database connection “Mysql” is missing, or could not be created.

Written by James McDonald

August 18, 2014

This error on Fedora 20 with CakePHP 2.5.3

CakePHP is NOT able to connect to the database.

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

These commands fixed it (basically the MySQL PDO adapter is missing)

yum install php-ZendFramework-Db-Adapter-Pdo-Mysql.noarch
systemctl restart nginx
systemctl restart php-fpm

Then refresh your browser and success!

CakePHP is able to connect to the database.

This was with a cakephp “development installation”. Which means you unpack the whole cakephp download in one spot:

[me@bpc01 cakephp]$ ls /home/www/cakephp/ -1

This is the relavent part of my nginx.conf showing how I get re-writing working

 server {
        listen       80;
        server_name  localhost;
        root         /home/www;

        #charset koi8-r;

        #access_log  /var/log/nginx/host.access.log  main;

        location / {

        location /cakephp/ {
            # rewrite every /cakephp url to point to the webroot but not
            # if it's already been done
            rewrite ^/cakephp(?!/app/webroot)(.*)$ /cakephp/app/webroot$1 break;
            try_files $uri $uri/ /cakephp/index.php?$uri&$args;



Submit a Comment

Your email address will not be published. Required fields are marked *

You May Also Like…

Toggen builds a new website

So I have built and hosted a new website for Roger Clark Pest Management they are a family owned and operated Pest...


Just downloaded WizTree (not a sponsor) from It seems to do what it says on the tin which is...

Scam call from “Telstra”

Just had a call from a man with a sub-continental accent from caller ID 0734946596 Told me there was problem with my...