For Programmers: Free Programming Magazines  


Home > Archive > PHP DB > July 2007 > MySQL user anHTACCESSusername not found?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author MySQL user anHTACCESSusername not found?
Instruct ICC

2007-07-13, 6:58 pm

In my apache web server error log, I see the following:

[Fri Jul 13 11:19:55 2007] [error] [client an.ip.addr.ess] MySQL ERROR:
Can't connect to MySQL server on 'mysql.server.ip.address' (110)
[Fri Jul 13 11:19:55 2007] [error] [client an.ip.addr.ess] MySQL user
anHTACCESSusername not found: /path/to/webpage

I can understand the first log entry; the client machine cannot contact the
server machine at the moment. (It cleared up without any changes as far as
I can tell. Perhaps a slow network?).

What I don't understand is why MySQL appears to be trying to authenticate
the HTACCESS username.

Once the user logs in to the webpage with his HTACCESS username, the script
connects to the MySQL server with the same MySQL login credentials for
everyone.

Even with register_globals on (which I can't turn off), I am explicitly
setting the $username variable in mysql_connect() which I call as
"mysql_connect($server, $username, $password)" to use to connect to MySQL.

I'm on PHP 4.3.10, MySQL 4.1.20, sql.safe_mode is Off, mysql.default_user
had no value.
Doesn't the web server own the process anyway?

From the docs:
mysql_connect username
The username. Default value is defined by mysql.default_user. In SQL
safe mode, this parameter is ignored and the name of the user that owns the
server process is used.

mysql.default_user string
The default user name to use when connecting to the database server if
no other name is specified. Doesn't apply in SQL safe mode.

Why is this second log entry present? I don't see any place where I ask
MySQL to authenticate an HTACCESS username. Perhaps there is a default
setting I can turn off?

Thanks.

________________________________________
_________________________
http://imagine-windowslive.com/hotm..._2G_0507

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com