I have vagrant box (precise64) utilizing Ubuntu server 12.04. I have installed manually (no use of LAMP) on the server the following:
- MySql server / MySql client -
Server version: 5.5.31-0ubuntu0.12.04.1 (Ubuntu)
- PHP5 -
PHP 5.3.10-1ubuntu3.6 with Suhosin-Patch (cli) (built: Mar 11 2013 14:31:48)
- Apache2 -
Server version: Apache/2.2.22 (Ubuntu)(was already existing on the box)
On the host (my desktop) I've set vagrant file and shared folders, installed CakePHP and I'm able to see the main page. (after setting VirtualHost on the server of course).
I've connected to the database with no problem. When I try to use a CLI tool of CakePHP I get the following error:
Error: Database connection "Mysql" is missing, or could not be created
I've also created a post regarding this matter on StackOverflow but decided to see if it's might be a server miss-configuration issue.
I've made sure PDO is enabled by the following results:
vagrant@precise64:/etc/php5/conf.d$ php -i | grep PDO PDO PDO support => enabled PDO drivers => mysql PDO Driver for MySQL => enabled
Since the answer was given to me on SO was to make sure PDO is enabled for the cli.
I've tested using vanilla PHP and was able to connect to my database using PDO. Yet I'm still unable to figure what causing this problem. Any help would be greatly appreciated.