when i am trying to connect db i get in this error in web site server... but in localhost it works perfectely....plz any one help
| SitePoint Sponsor |
when i am trying to connect db i get in this error in web site server... but in localhost it works perfectely....plz any one help

Basicaly it is telling you the password or username is incorrect.
Have you added a user to the online database?
Quite often if you have a username of say "bolgs" and a hosting account with a username of "fred" the username for the database would be "fred_blogs".
Do you have a seperate connection file for use localy and online as I doubt both usernames and passwords are the same?but in localhost it works perfectely
hi rubbel
i hav a doubt in giving the db host name for example im giving 'ftp.mysitename'.....it's correct r not plz reply me


Keep in mind that the host, username, and password will not be the same as your FTP information.
Usually it will be in the form of mysql.mywebsite.com or it may be localhost (granted I hope it isn't -- as most hosts should have separate mysql servers apart from their web servers).
When in doubt, I'd check your admin panel of your host, and see what usernames are setup for your MySQL databases. Maybe change/reset one of the passwords so you know what to try.
hi all,
i want to know how to find db host name for power monster servers. if any one know plz help me.



If you have a control panel go there and from memory there will be three buttons for database management you do not want the Mysql one but either of the other two will give you the user name.
You will need to setup a user and the add that user to the database - one of the buttons I mentioned above will allow you to setup the user and the other will allow you to create the database and add the user to the database.
hi rubbel,
i know that but now i want to connect to database from php. so i want to know the db host name for the connection.
when i give "localhost" r "websitename" i get error: access denied for user.
i think the db host name is differs between servers. so i want know how and where i get the correct db host name for my website.


according to a 30 second google-fu, power monster (Itself likely a reseller of eNom.com) uses cPanel; usually this means their mySQL host is indeed 'localhost', but not always. Check your account information screen, the mySQL setup screen, and if it's on neither of those, contact PowerMonster directly (US Phone Number: 769-287-0032)
Never grow up. The instant you do, you lose all ability to imagine great things, for fear of reality crashing in.
Bookmarks