How To Install XAMP and Chang Password Root Mysql

 



Here’s a step-by-step guide on how to install XAMPP and change the MySQL root password:


🔧 Part 1: Install XAMPP

For Windows:

  1. Download XAMPP
    Go to the official site:
    👉 https://www.apachefriends.org
  2. Run the Installer
    Double-click the .exe file you downloaded.
  3. Choose Components
    Leave default selections (Apache, MySQL, PHP, phpMyAdmin) and click Next.
  4. Select Install Location
    Default is C:\xampp – Click Next.
  5. Complete Installation
    After installation, check Start Control Panel and click Finish.
  6. Start Apache and MySQL
    Open XAMPP Control Panel and click Start next to Apache and MySQL.

🔐 Part 2: Change MySQL Root Password

Default username: root
Default password: (blank)

🟠 Method 1: via phpMyAdmin

  1. Go to: http://localhost/phpmyadmin
  2. Click on User accounts tab.
  3. Find the user root@localhost, and click Edit privileges.
  4. Scroll down to Change password section.
  5. Enter your new password twice, then click Go.

After this, phpMyAdmin may give an error. You’ll need to update its config.

Fix phpMyAdmin login after changing password:

  1. Open this file:
    C:\xampp\phpMyAdmin\config.inc.php
  2. Find this line:

#php

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

  1. Replace with:

#php

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

  1. Save and restart Apache + MySQL in XAMPP Control Panel.

🟠 Method 2: via MySQL Command Line (Optional)

  1. Open XAMPP Control Panel → Click Shell.
  2. Enter MySQL:

#nginx

mysql -u root

  1. Set a new password:

#sql

ALTER USER 'root'@'localhost' IDENTIFIED BY 'your_new_password';

FLUSH PRIVILEGES;

EXIT;


how to install xampp,

install xampp on windows,

xampp installation guide,

xampp setup tutorial,

xampp install php and mysql

 

Post a Comment

0 Comments