How To Set Root Password In phpMyAdmin/MySQL On XAMPP In Windows 10 - Step By Step

XAMPP is one of the best open source web server to run your PHP sites locally in your computer. It installs Apache, MySQL, PHP & PERL in your computer. XAMPP is a cross-platform solution means it can be installed on Windows, Linux & Mac.

By default XAMPP doesn't set password for phpMyAdmin. To secure your phpMyAdmin you need to set a password. You can access phpMyAdmin directly from Localhost & set password.

In this tutorial you will learn step-by-step to How to set root password in phpMyAdmin on XAMPP Server.


How To Set Root Password In phpMyAdmin/MySQL On XAMPP, Windows 10 For Beginners | Secure phpMyAdmin On XAMPP

  • Follow the steps:

Step 1:

  • Open localhost.
  • Click phpMyAdmin.

How To Set Root Password In phpMyAdmin/MySQL On XAMPP, Windows 10 For Beginners | Secure phpMyAdmin On XAMPP

  • Click User accounts.

How To Set Root Password In phpMyAdmin/MySQL On XAMPP, Windows 10 For Beginners | Secure phpMyAdmin On XAMPP

  • Look for the row having User name: root & Host name: localhost.
  • You can see that there is No for Password.
  • Click Edit Privileges.

How To Set Root Password In phpMyAdmin/MySQL On XAMPP, Windows 10 For Beginners | Secure phpMyAdmin On XAMPP

  • Click Change password.

How To Set Root Password In phpMyAdmin/MySQL On XAMPP, Windows 10 For Beginners | Secure phpMyAdmin On XAMPP

  • Enter Password.
  • Click Go.

How To Set Root Password In phpMyAdmin/MySQL On XAMPP, Windows 10 For Beginners | Secure phpMyAdmin On XAMPP

  • You can see the password for User name root has been set successfully.

How To Set Root Password In phpMyAdmin/MySQL On XAMPP, Windows 10 For Beginners | Secure phpMyAdmin On XAMPP

  • Now go back to localhost.
  • Click phpMyAdmin.

How To Set Root Password In phpMyAdmin/MySQL On XAMPP, Windows 10 For Beginners | Secure phpMyAdmin On XAMPP

  • You can see that it is showing an error.

How To Set Root Password In phpMyAdmin/MySQL On XAMPP, Windows 10 For Beginners | Secure phpMyAdmin On XAMPP

Step 2:

  • Now go to XAMPP folder.
  • Click sub folder phpMyAdmin
  • Look for the file config.inc.php

How To Set Root Password In phpMyAdmin/MySQL On XAMPP, Windows 10 For Beginners | Secure phpMyAdmin On XAMPP

  • Right click on config.inc.php.
  • Openwith Notepad or WordPad or Notepad++

How To Set Root Password In phpMyAdmin/MySQL On XAMPP, Windows 10 For Beginners | Secure phpMyAdmin On XAMPP

Look for these two lines:

  •    $cfg['Servers'][$i]['auth_type'] = 'config';
  •    $cfg['Servers'][$i]['password'] = '';

How To Set Root Password In phpMyAdmin/MySQL On XAMPP, Windows 10 For Beginners | Secure phpMyAdmin On XAMPP

  • Replace 'config' with 'cookie'
  • Enter your Password that you have created earlier on empty space.
  • Save the file.

How To Set Root Password In phpMyAdmin/MySQL On XAMPP, Windows 10 For Beginners | Secure phpMyAdmin On XAMPP

  • Now go back to that page again & Refresh or access phpMyAdmin again.

How To Set Root Password In phpMyAdmin/MySQL On XAMPP, Windows 10 For Beginners | Secure phpMyAdmin On XAMPP

  • You can see that the error has been removed.
  • Now enter the User name: root & your Password.

How To Set Root Password In phpMyAdmin/MySQL On XAMPP, Windows 10 For Beginners | Secure phpMyAdmin On XAMPP

  • After login, it will look like this.

How To Set Root Password In phpMyAdmin/MySQL On XAMPP, Windows 10 For Beginners | Secure phpMyAdmin On XAMPP

  • You can see that Password is Yes.
  • Now your phpMyAdmin is secure.

How To Set Root Password In phpMyAdmin/MySQL On XAMPP, Windows 10 For Beginners | Secure phpMyAdmin On XAMPP

  • If you like this post don't forget to share this post with other people. Share your feedback in the comments section below.


 

Recommended Posts


Related Posts

Comments

  1. Thank you very much! Very helpful

    ReplyDelete
  2. oldu çok teşekkür ederim. bu sorunu çözüp php derslerime devam edeceğim için çok mutluyum

    ReplyDelete
    Replies
    1. You are welcome Hasan. Probably you said in Turkish (Thank you very much. I am very happy to solve this problem and continue my php lessons) :)

      Delete
  3. Excellent and perfect. It worked for me.

    ReplyDelete

Post a Comment