Symfony MAMP connecting to db error

September 2, 2008

I had a bit of trouble connecting to my mysql db while trying to run symfony propel:insert-sql

It would return with a massive error with this in the middle: Native Error: Can’t connect to local MySQL server through socket ‘/var/mysql/mysql.sock’ (2)

I fixed it by changing the db configuration in the config/propel.ini to use the ip 127.0.0.1 instead of localhost

Advertisements

2 Responses to “Symfony MAMP connecting to db error”

  1. Miguel Says:

    I’m having the same problem and I can’t solve with your solution.

    Have you figured out what is the real problem here?

  2. fabilo Says:

    The problem is that symfony couldn’t establish a connection to the db. My specific problem was that some reason it couldn’t connect via the hostname localhost, but could via the IP.

    I would check your db connection details and try again 🙂


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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

%d bloggers like this: