I have hosting provided by eleven 2 and I just created a new MySQL user and gave it access to every action listed.
I'm getting 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 config 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 to do the following as suggested by this post 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 denied for user". When I log into the CPanel and check out the database users, it shows the user that I tried to log in as, so I'm confused as to why it won't work.
EDIT - I got it to work. There was something wrong with the server. Contacted the host and they took care of it. Thanks for the replies.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…