mysql - PDO Exception with Laravel 4 php artisan migrate command on EC2 AWS -


i have ubuntu 12.04 instance on ec2 in aws , laravel 4 project uploaded there. trying run php artisan migrate, reason cannot connect mysql server through command. able mysql db on sql pro find using ssh (using elastic ip host). ssh server using elastic ip.

i error when run php artisan migrate:

[pdoexception]                                                                  sqlstate[hy000] [2003] can't connect mysql server on '**.***.***.**' (11     1)                                                                               migrate [--bench[="..."]] [--database[="..."]] [--path[="..."]] [--package[="..."]] [--pretend] [--seed] 

where starts represent "elastic ip", host use connect mysql in sql pro.

in database.php config file, connecting using:

'mysql' => array(             'driver'    => 'mysql',             'host'      => '*elastic ip*',             'database'  => 'dbname',             'username'  => '****',             'password'  => '*******',             'charset'   => 'utf8',             'collation' => 'utf8_unicode_ci',             'prefix'    => '',         ), 

i have installed php5, apache2, mcrypt, , php5-mysql on server. how solve issue? thank you.

sounds not allowing 'user' database.

in mysql 'user' combination of 'username'@'hostname'. allowing username particular host localhost or 127.0.0.1. see if problem can create user hostname wildcard %. also, allowing user databases. mysql> command line this:

create user '<username>'@'%' identified 'your-password'; grant privileges on *.* '<username>'@'%'; 

Comments

Popular posts from this blog

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -

php - Magento - Deleted Base url key -

android - How to disable Button if EditText is empty ? -