From: Alain Ketterlin <al...@dpt-info.u-strasbg.fr>
Date: Wed, 15 Aug 2012 17:22:49 +0200
Local: Wed, Aug 15 2012 11:22 am
Subject: Re: _mysql_exceptions.OperationalError: (2005, "Unknown MySQL server host
Hans Mulder <han...@xs4all.nl> writes:No, it means that connect received a single string "user = 'root'..."
> On 15/08/12 15:30:26, nepaul wrote:
>> The code:
>> import MySQLDB
>> strCmd = "user = 'root', passwd = '123456', db = 'test', host = 'localhost'"
>> _mysql_exceptions.OperationalError: (2005, "Unknown MySQL server host 'user = 'root',
> This message means that the MySQL connector cannot find 'localhost'.
instead of a set of individual keyword parameters, and took the whole
string to be the name of the host (its first parameter). Of course,
there is no host with such a name.
The solution is to parse the string into individual values, and pass
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.