Jump to content

MySQL Authentication Error


Patrick

Recommended Posts

Hi, I hoping that someone will be able to help me, I\'m getting an odd error, that I can not seem to get to the bottom of. When attempting to access a list page, I get put through to the login screen and after successfully entering a valid user name and password I get put through to the page I expected, which is a list of database records. Upon clicking a link to add or edit a record I get the error below. Is anyone able to give me any ideas as to what might cause this to happen upon editing or adding a record.

 

The user is a root user with all privileges and both the list and edit screens have the same security restrictions. Using CodeCharge Studio, Apache 2.0.43, PHP 4.2.3, MySQL 3.23.54, with MySQL and Apache running as services on Windows 2000 where applicable. I get the same error when running from a Unix test server running similar versions.

 

Most appreciative if anyone could give any advice.

 

Patrick

 

 

ERROR

Warning: Access denied for user: \'patrick@localhost\' (Using password: YES) in /home/patrick/public_html/test/xyz.php on line x

 

Warning: MySQL Connection Failed: Access denied for user: \'patrick@localhost\' (Using password: YES) in /home/whitit/public_html/test/xyz.php on line x

Database error: pconnect(localhost, patrick, $Password) failed.

MySQL Error: ()

Session halted.

Link to comment
Share on other sites

Thanks for such a quick reply effigy, I\'ve tried both of your suggestions but so far not having any luck. The pconnect arguments are held in variables. The strange thing is that it connects for authentication, and for displaying the list, but refuses authorisation for the add/edit screen. I\'m thinking it is to do with permission settings, but I can\'t find any differences with the permissions between the pages, or any anomaly in the MySQL users database.

 

Any further thoughts? Any help is appreciated. Once again, thanks for your reply.

 

Patrick

Link to comment
Share on other sites

very odd.

 

you can try appending...

or die ( mysql_errno() . \' \' . mysql_error() );

...to your mysql statements to see if it returns any more specifics on the problem.

 

have you tried using mysql_connect() instead? something could be awry in your php.ini pconnect settings...

Link to comment
Share on other sites

Thank you, I have tried both connect and pconnect with the same results, again with no luck. It has however, confirmed that it is a problem with permissions and not with the connect. I\'m racking my brains to think what is not right with the permissions - especially having used the grant statement you mentioned earlier... it is a puzzle. Any more ideas appreciated, but thank you very much for your assistance.

 

Patrick

Link to comment
Share on other sites

effigy, thank you for your assistance, but I came up with a new theory... If it doesn\'t work and you can\'t fix it throw it out and start again. Might not be very good, but the problem is gone and I\'m happy. I suspect that there was a conflict with the code generator I\'m using, it\'s very powerful and I\'m still getting used to it. It turned out that the error messages were generated by Code Charge and that helped to confuse me a bit.

 

Thanks again,

 

Patrick.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.