Help req: Problems with MySQLdb

timw.google timothy.williams at nvl.army.mil
Thu Jun 22 15:24:40 EDT 2006


Do you have a MySQL acccount set up on the localhost? I usually create
two users with the same privs. One for the localhost where the server
is, another to connect from somewhere else.

Something like

mysql> grant usage on *.* to 'user'@'localhost' identitfied by
'some_pass';
mysql> grant usage on *.* to 'user'@'%' to identified by 'some_pass';


Check out

http://dev.mysql.com/doc/refman/4.1/en/adding-users.html

Hope this helps.

rodmc wrote:
> I have written an application that connects to a database on a remote
> machine which uses MySQLdb 1.2.0. The application works perfectly when
> connecting to the database from a remote machine, however when it
> attempts to connect to a database on the same machine a connection
> error is generated. I have attached what little info I can below.
>
> DBSERVERIP = "1.2.3.4"
> db = MySQLdb.connect(host=DBSERVERIP, user="user", passwd="password",
> db="nuke")
> --- it refuses to connect on the above line and the exception is caught
> and a message displayed.
>




More information about the Python-list mailing list