Newbie: Using MySQL

John Leach john at ecsc.co.uk
Sun Nov 11 02:48:09 CET 2001


On Sun, 2001-11-11 at 01:20, Jordan Elver wrote:
> Hi,
> I'm getting the following even though I know the password and username are 
> correct as I use them in all my PHP scripts.
> 
> _mysql_exceptions.OperationalError: (1045, "Access denied for user: 
> 'root at localhost.localdomain' (Using password: YES)")
> 
> Any ideas?
> 


This sounds more of a mysql server config problem.

If the php scripts run on the same server as the mysql daemon does, then
it may not (and by default probably won't) actually be using tcp/ip to
connect, it will be using a unix socket.

I'm not so sure if the same applied to the mysqldb module (and I'm too
tired to check :).  Check your host based permissions on the mysql
server.  Make sure the user you are connecting as is able to connect
from the host you are running the python script on.

As a test you could try adding the host "%" on the mysql permissions as
this will allow any host to connect, but this is bad practice, make sure
to put it back after testing.

John.

goodnight :)

-- 
========================================================================
This email is intended solely for the addressee. When addressed to our
clients any opinions or advice contained are subject to the terms and 
conditions expressed in the governing ECSC Conditions of Service. 





More information about the Python-list mailing list