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".
but in localhost it works perfectely
Do you have a seperate connection file for use localy and online as I doubt both usernames and passwords are the same?
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.
You will need to contact your host and ask them.
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.
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.
You really should open a support request with your host. That is the best and fastest way to get your answer. If you were with a host I was familiar with I might be able to answer that, but I'm unfamiliar with power monster.
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)
This topic is now closed. New replies are no longer allowed.