How to change wamp phpmyadmin password?

What should I do to resolve "access denied for user 'root'@'localhost' (using password: NO)" error message while connecting to the database from a PHP application I wrote?

  • This is my first PHP application at http://www.cmdanigeria.org but the database connection has been giving me huge challenges. please help me to solve this problem. I have already uploaded all my php files through filezilla in the www folder of the cpanel. I have successfully exported and imported the database from my WAMP-phpmyadmin to the phpmyadmin on the cpanel(remote server). Please tell me what to do in order to make my site visible and connected to the database.

  • Answer:

    This problem can be resolve by this:  query " show grants for root@localhost;"  you will found that this user is no privileges , and what you need is just add privileges to root@localhost;

Dehua Yang at Quora Visit the source

Was this solution helpful to you?

Other answers

The root user probably has a password assigned to it and you'll need to reset that password if you do not know what it is. Instructions on how to do this can be found here http://dev.mysql.com/doc/refman/5.7/en/resetting-permissions.html

David Condrey

Right now you are using root user which is working on your local machine. But on production server, you have to create your a new MySQL user to use in your application. Follow this (http://www.siteground.com/tutorials/php-mysql/mysql_database_user.htm) to create a MySQL user in CPanel. And use newly created username and password in your application connection file/configuration. You also need to give permissions to user cmdanige_doc to access to your database. Ref to section "Adding a user to a MySQL Database Detailed Tutorial" in the above mentioned link. Here is official CPanel documentation http://docs.cpanel.net/twiki/bin/view/11_30/CpanelDocs/MySQLDatabases

Muhammad Wasif

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.