Can you verify that the connection code is being run?
The reason I ask is that PHP is reporting the 'access denied' error is being triggered by mysql_query(), not mysql_connect() , which would lead me to believe that at the time your script attempts to call mysql_query(), the connection has not been established.
PHP will attempt to establish a connection using the default values specified in php.ini, which is usually maybe a Username, and that's it. I'm thinking that's what happened based on the "using password NO" part.
The reason I ask is that PHP is reporting the 'access denied' error is being triggered by mysql_query(), not mysql_connect() , which would lead me to believe that at the time your script attempts to call mysql_query(), the connection has not been established.
PHP will attempt to establish a connection using the default values specified in php.ini, which is usually maybe a Username, and that's it. I'm thinking that's what happened based on the "using password NO" part.
Comment