Pirkka wrote:
>
> I started migrating from ActiveMapper to Elixir, and have been
> wrestling with this for hours:
>
> DBAPIError: (Connection failed) (OperationalError) (2005, "Unknown
> MySQL server host '/Applications/MAMP/tmp/mysql/mysql.sock' (1)")
>
> Here are the command parameters that sqlalchemy is using to open the
> connection:
>
> {'passwd': 'root', 'host': '/Applications/MAMP/tmp/mysql/mysql.sock',
> 'db': 'django', 'user': 'root', 'client_flag': 2}
>
> I have no problem connecting to the above sock file using Django or
> mysql command line client with -S parameter. Any ideas what could
> cause the connection to fail?
>
> Yours,
> Pirkka
I think your 'host' parameter should be 'localhost', and you should pass
an extra parameter 'unix_socket' that contains the path to the socket
file.
If you are specifying it as a URI, it should look something like this:
mysql://root:[EMAIL PROTECTED]/django?unix_socket=/Applications/MAMP/tmp/my
sql/mysql.sock
Hope that helps,
Simon
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---