If you don’t have XAMPP, please install it first according to “Installation of XAMPP“. And If you’ll use MariaDB in a production environment, make it secure by setting password according to “How To Set MySQL Password in XAMPP“.
Method
1. Open phpMyAdmin
Start XAMPP Control Panel and run Apache and MariaDB.
Access localhost/phpmyadmin/ or click Admin button of MySQL.
If you don’t have XAMPP, please install it first according to “Installation of XAMPP“.
XAMPP security
Please refer to “Is XAMPP production ready?” in Windows Frequently Asked Questions for information. Though it contains some old contents, but it says why default XAMPP shouldn’t be used in a production environment.
Method
1. Run Apache and MySQL
Start XAMPP Control Panel and run Apache and MySQL.
2. Access phpMyAdmin and change password
Access localhost/phpmyadmin with your browser. And click “User accounts”.
Click “Edit privileges” for root@localhost.
Click “Change password”.
Input your password. You can generate highly safe password with Generate button. And click “Go” button.
Close phpMyAdmin.
*An error will occur when accessing phpMyAdmin now because phpMyAdmin doesn’t know the password.
3. Change config.inc.php of phpMyAdmin
Open xampp\phpMyAdmin\config.inc.php and change the value of $cfg[‘Servers’][$i][‘password’].
/* Authentication type and info */
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = ''; //input the password here
Save the file and close it.
Confirmation
Open the shell.
And input command “mysql -h localhost -u root -p” and the password you defined.
# mysql -h localhost -u root -p
Enter password: <input password here>
Confirm that MariaDB is connected.
Input “quit” to quit MySQL.
And confirm that you can access localhost/phpmyadmin.