MySQL Question

Access denied for Database User at goDaddy website

I am trying to view my website from godaddy. The domain name is registered on somewhere else and hosting is from godaddy. After changing DNS settings, I cretae my db in godaddy and import all tables in it. After that, i created a username and give it to all previleges. Then, when i tried to connect to database, i am facing error

Access denied for user 'myusername'@'' (using password: YES)



$conn = mysql_connect("", "myusername","mypassword", "arikai2_2" ) or die(mysql_error());



Answer Source

Where did you get the dbhost value from?

In your hosting panel, there should be somewhere a section where you can get the right details about connecting to your database server and its databases.

If you are using the classic goDaddy hosting, you can find this info in the:
Databases > MySQL Section > Actions > Details
The dbhost is down at the bottom of this screen: Hostname

GoDaddy Classic Hosting Panel GoDaddy Classic Hosting Databases GoDaddy Classic Hosting Database Details

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download