Newbie: Using MySQL

Skip Montanaro montanaro at tttech.com
Sun Nov 11 07:00:59 EST 2001


    Jordan> I've tried using the MySQLdb module (I think) and I cannot
    Jordan> connect. I know that the server is running and that the
    Jordan> passwords are correct?

    Jordan> db = MySQLdb.Connect(host=db_host, user=db_user,
	                         passwd=db_passwd, db=db_db)

Based upon what John Leach said, you might want to check for the
"unix_socket" parameter.  If PHP is using a unix socket but your Python
program is running on another server, perhaps you mysqld is not even
listening to a TCP socket.  Can you successfully telnet to port 3306?

-- 
Skip Montanaro (skip at pobox.com)
http://www.mojam.com/
http://www.musi-cal.com/




More information about the Python-list mailing list