Monday 8 October 2018

How to set root password in wampp localhost using phpMyAdmin

In this post we are going to see how to set password in phpmyadmin i.e when any user opens phpmyadmin of your local pc then phpmyadmin should ask for enter login credentials to see databases and table.

So, to configure phpmyadmin follow the steps below:

Step 1: open your phpmyadmin  http://localhost/phpmyadmin/ click on Users

Installing-and-configuring-wamp-server-phpmyadmin-1.jpg (695×211)

Step 2: After this you will see some users are already configured in phpmyadmin where you have to click on edit privileges link of highlighted all three users i.e. 127.0.0.1, ::1, localhost

Installing-and-configuring-wamp-server-phpmyadmin-2.jpg (587×257)

Step 3: On each edit privileges click you will below page where you have to set same password for all three users which you want after each changes click on "Go" button

Installing-and-configuring-wamp-server-phpmyadmin-3.jpg (646×310)

Step 4: After password setting of these three users just try to refresh your phpmyadmin dashboard, you will get "access denied" error as given in below image.

Error #1045 – Access denied for user ‘root’@’locahost’ (using password: YES)


Step 5: By resolving this error we are ends up with our root password setting of your wampp phpmyadmin for resolving this open the "config.inc.php" file found inC:\wamp\apps\phpmyadmin4.1.x and look for /* Authentication type */ around line 28.

Set your password for the root account by entering it between the single quotes ‘ ‘ in the following line: 

$cfg['Servers'][$i]['password'] = 'mypassword';

Installing-and-configuring-wamp-server-phpmyadmin-config.inc_.jpg (495×102)

 
Replace mypassword with your own password which you are configured in phpmyadmin
 
or for other option just comment
 
//$cfg['Servers'][$i]['auth_type'] = 'config';
 
& uncomment
 
$cfg['Servers'][$i]['auth_type'] = 'cookie'; 
 
Step 6: You are done with your setting for checking just open phpmyadmin in browser by following url: http://localhost/phpmyadmin/

You will see your phpmyadmin first page ask for username, password to enter in the phpmyadmin as below image




SYKml.png (400×483)
 
So, If you are having any query and doubt regarding this configuration then you can ask in comments.  
 
Thank you !! 

No comments:

Post a Comment

The Future of Remote Work, According to Startups

  The Future of Remote Work, According to Startups No matter where in the world you log in from—Silicon Valley, London, and beyond—COVID-19 ...