0

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.

0

PDO was enabled on the guest (server) side while I tried to use the CLI on the HOST (Desktop) side. Using the CLI from the guest work with no problem (I guess setting PDO enabled on HOST might do the trick also, not sure of that though)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.