MySQL Forums
Forum List  »  PHP

Access denied for user
Posted by: Harvey MacKenzie
Date: January 12, 2019 07:24PM

MySQL Version 5.1.73-cll
PHP Version 5.3.29

I am able to access the database via cPanel. However when I try to access it via a php script I get this error:
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'ratterr_dbuser'@'localhost'

ratterr is the cPanel login and dbuser is a database user I created. dbuser has full rights to the database.

I have trying using ratterr_dbuser, dbuser and the cPanel login. I have set the passwords to be the same and have dbl-checked spellings. No matter what user I try I get the same error (with the appropriate user name showing in the error).

I have created a new database and imported the data and still the same error. I have created the database on a different server, and the same error.

I am obviously overlooking something simple. HELP.....


Options: ReplyQuote

Written By
Access denied for user
January 12, 2019 07:24PM
January 12, 2019 08:18PM
January 12, 2019 08:23PM
January 13, 2019 02:44AM
March 04, 2019 02:39AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.