Click here for Toll-Free Service for your business starting at $2.00 per month

Main Menu

access denied (to database)

Started by alberto, December 17, 2005, 05:35:49 PM

Previous topic - Next topic


I recently restored my website and my database using a backup

Alas, the website doesn't function any more; The connection with my database is not established in a correct way. I make a connection in a php script with
$link = mysql_connect("localhost","databaseusername","databasepassword")
or die ("could not connect to database");

when the .php script is used i get
Access denied for user 'databaseusername'@'%' to database 'databasename'

The only difference I can think of with before the fire is that my databaseusername is different.
It used to be databaseusername=accountusername
now they are different.
Can I change my databaseusername to see if this has any effect ?


Be sure your Username, Password, and Database name are correct.

This system is case sensitive.  Be sure you have entered the details exactly as you have created them.  (You can view your database names, usernames, and passwords via the Options panel).

Options Panel -> Manage Databases -> View/Manage Databases
(You can click the "click here" link near the top to show/hide the passwords)

Thank you, Admin


I'm so sorry. When reinstalling my database after the fire I used a different databasename. I didn't realise that.