Hi. I have a source installation of mysql 5.0.18 along with packaged
binary mysql-client libraries for mysql 4.x. This causes me some
trouble because it seems the default socket location has changed for
/var/run/mysqld/mysqld.sock to /tmp/mysqld.sock. For example:
>>> import MySQLdb
>>> MySQLdb.connect(host = "localhost", user = "root", db = "test")
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/lib/python2.4/site-packages/MySQLdb/__init__.py", line
66, in Connect
return Connection(*args, **kwargs)
File "/usr/lib/python2.4/site-packages/MySQLdb/connections.py", line
134, in __init__
super(Connection, self).__init__(*args, **kwargs2)
_mysql_exceptions.OperationalError: (2002, "Can't connect to local
MySQL server through socket '/var/run/mysqld/mysqld.sock' (13)")
That doesn't work because there is no domain socket there. But if you
specify the socket explicitly:
>>> m.connect(host = "localhost", user = "root", db = "test",
unix_socket="/tmp/mysql.sock")
<_mysql.connection open to 'localhost' at 81ff9ec>
It works fine. I haven't found a way in SQLObject to specify a
database URI using a unix domain socket in a non-default location.
Excuse me if there already is a way, but If there isn't, then maybe
that can be added? Maybe this issue is that TurboGears ticket
http://trac.turbogears.org/turbogears/ticket/305 is about, but I can't
tell for sure. Oh, and I already know it is not a good idea to allow
passwordless root-logins to your db. :)
--
mvh Björn
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642
_______________________________________________
sqlobject-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss