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 *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.

You May Also Like…

Meraki Open Source Licenses

Until today I assumed that Meraki was built in-house with only closed source software. But having a look at the...


If you have Veeam backup failing with the Updating BCD failed with Cannot update SafeBoot flag and SentinelOne is...