How to change wamp phpmyadmin password?

How to change root password of phpmyadmin in WAMP?

  • I opened mysql console and wrote the following : SET PASSWORD FOR root@localhost = PASSWORD('temppass') ; Now when I open phpmyadmin, it says "Access denied for user 'root'@'localhost' (using password: NO)" I was trying to set a password for root and I read it somewhere that we change root password from console itself, unlike previous versions where we had to alter the config files. Any detailed tutorial on changing root password to secure a database? I'm new to all this. Thank you.

  • Answer:

    Once you have changed the root password you need to tell phpMyAdmin what the new password is as by default the root password is held in the c:\wamp\apps\phpmyadmin4.1.14\phpmyadmin.conf file. /* * First server */ $i++; /* Authentication type */ $cfg['Servers'][$i]['verbose'] = 'mysql wampserver'; //$cfg['Servers'][$i]['auth_type'] = 'cookie'; $cfg['Servers'][$i]['auth_type'] = 'config'; $cfg['Servers'][$i]['user'] = 'root'; $cfg['Servers'][$i]['password'] = 'YOUR_NEW_PASSWORD'; <--change /* Server parameters */ $cfg['Servers'][$i]['host'] = '127.0.0.1'; $cfg['Servers'][$i]['connect_type'] = 'tcp'; $cfg['Servers'][$i]['compress'] = false; /* Select mysql if your server does not have mysqli */ $cfg['Servers'][$i]['extension'] = 'mysqli'; //$cfg['Servers'][$i]['AllowNoPassword'] = true; $cfg['Servers'][$i]['AllowNoPassword'] = false; <--change A better solution in my opinion is to change this file so that phpMyAdmin throws a login screen so you can enter/test new accounts as well as just root So I would change c:\wamp\apps\phpmyadmin4.1.14\phpmyadmin.conf to /* * First server */ $i++; /* Authentication type */ $cfg['Servers'][$i]['verbose'] = 'mysql wampserver'; $cfg['Servers'][$i]['auth_type'] = 'cookie'; //$cfg['Servers'][$i]['auth_type'] = 'config'; //$cfg['Servers'][$i]['user'] = 'root'; //$cfg['Servers'][$i]['password'] = ''; /* Server parameters */ $cfg['Servers'][$i]['host'] = '127.0.0.1'; $cfg['Servers'][$i]['connect_type'] = 'tcp'; $cfg['Servers'][$i]['compress'] = false; /* Select mysql if your server does not have mysqli */ $cfg['Servers'][$i]['extension'] = 'mysqli'; $cfg['Servers'][$i]['AllowNoPassword'] = false; Now you will get a login screen like this

Chand Sethi at Stack Overflow Visit the source

Was this solution helpful to you?

Other answers

Sqlfiddle.com, which might be your only sql engine for you until you fix yours, says that: select PASSWORD('temppass') returns *0F7947B374392A8F5638B396E0E4BB198D1D16D8 It it a function that takes a clear text string and produces a hash value for alledgedly secure password storage. See http://www.w3resource.com/mysql/encryption-and-compression-functions/password().php

Drew Pierce

Related Q & A:

Just Added Q & A:

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.