I recently change database username password from c-panel and now when i open website or admin panel it shows error.how to resolve this issue? how can i add new password in magento database? or what can i do?
Changing database username and password isn't the right thing to do as the changes will not be effected in the config file, you should have just created a new user and assigned it to the database with full privileges.
You'll have to look for your config file in your cpanel and change the username and password there to the new ones Location to the config file i: /app/etc/local.xml Edit local.xml file, locate your database and the necessary details. The file looks as shown below