I have a hosting provided by eleven 2, and I just created a new MySQL user and gave him access to each specified action.
I get the following error
Warning: mysql_connect() [function.mysql-connect]: Access denied for user '(username is here, removed for posting)' (using password: YES) in /home/.../public_html/config.php on line 10
Here is my configuration file
//connection details have been removed for posting purposes <?php define('SQL_SERVER',''); // Database Server define('SQL_USER',''); // User define('SQL_PASS',''); // Password define('SQL_DB',''); // database mysql_connect(SQL_SERVER,SQL_USER,SQL_PASS) or die("Error: ".mysql_error()); // Connection to the server mysql_select_db(SQL_DB) or die("Error: ".mysql_error()); // Connecting to the database ?>
I tried the following as this post suggested Access denied for user 'someuser' @ 'localhost' (using password: YES)
GRANT ALL PRIVILEGES ON databasename.* TO 'bookorama'@'%' IDENTIFIED BY 'yourpassword'; FLUSH PRIVILEGES;
But I got the following error "# 1044 - Access is denied to the user." When I log into CPanel and check the database users, it shows the user I was trying to log in with, so I'm confused about why it won't work.
EDIT - I got it to work. Something is wrong with the server. They turned to the owner, and they took care of this. Thanks for answers.
source share