Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’ on Zend Framework

Error :
Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’

the solution is change the following lines

ubuntu@ip-10-128-138-137:~$ cat /srv/www/xxx/application/configs/application.ini | grep resources.db
resources.db.adapter         = "PDO_MYSQL"
resources.db.params.host     = "localhost"
resources.db.params.username = "xxx"
resources.db.params.password = "xxxpass"
resources.db.params.dbname   = "xxxdb"
resources.db.params.profiler.enabled = true
resources.db.params.profiler.class = Zend_Db_Profiler_Firebug
resources.db.params.driver_options.1002 = "SET NAMES utf8"

into

ubuntu@ip-10-128-138-137:~$ cat /srv/www/xxx/application/configs/application.ini | grep resources.db
resources.db.adapter         = "PDO_MYSQL"
resources.db.params.host     = "127.0.0.1"
resources.db.params.username = "xxx"
resources.db.params.password = "xxxpass"
resources.db.params.dbname   = "xxxdb"
resources.db.params.profiler.enabled = true
resources.db.params.profiler.class = Zend_Db_Profiler_Firebug
resources.db.params.driver_options.1002 = "SET NAMES utf8"
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s