0% found this document useful (0 votes)
80 views2 pages

How To Reset Root Password On XAMP Mysql

This document provides instructions for resetting the root password in XAMPP MySQL. It involves adding a configuration option to skip password checks, connecting to MySQL as the root user without a password, updating the root user to have a blank password, removing the configuration option to re-enable password checks, and testing the connection with a blank password.

Uploaded by

Milan Baratovic
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
80 views2 pages

How To Reset Root Password On XAMP Mysql

This document provides instructions for resetting the root password in XAMPP MySQL. It involves adding a configuration option to skip password checks, connecting to MySQL as the root user without a password, updating the root user to have a blank password, removing the configuration option to re-enable password checks, and testing the connection with a blank password.

Uploaded by

Milan Baratovic
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

How to reset `How to reset `root` password in XAMPP MySQL

Open C:\xampp\mysql\bin\my.ini (MySQL config file)

Find the line [mysqld] and right below it add skip-grant-tables. Example:


# The MySQL server
[mysqld]
skip-grant-tables
port= 3306
socket = "C:/xampp/mysql/mysql.sock"
basedir = "C:/xampp/mysql"
tmpdir = "C:/xampp/tmp"
[...etc...]

This should allow you to access MySQL if you don't know your password.
Stop and start MySQL from XAMPP to make this change take effect.

Next, in command line, connect to MySQL:

C:\xampp\mysql\bin\mysql.exe --user=root

Once in MySQL command line "select" the mysql database:


USE mysql;
Then, the following command will list all your MySQL users:

SELECT * FROM user \G;

You can scan through the rows to see what the root user's password is set to. There will
be a few root users listed, with different hosts.

To set all root user's to have a blank password, run this command:


UPDATE user SET password = '' WHERE user = 'root';
When you're done, run exit; to exit the MySQL command line.

Next, re-enable password checking by removing skip-grant-tables from C:\xampp\mysql\


bin\my.ini.
Save changes, restart MySQL from XAMPP.

Test it
Finally, test you can connect to the database using username root and password '' (blank) via one
of the following methods:
1. Attempting to access phpMyAdmin (http://localhost/phpmyadmin)
2. Run the debug route I provided from within one of your Laravel apps
The username is usually root and no password. If that doesn’t work you should look for
phpMyAdmin configuration file, usually at phpmyadmin/config.inc.php and look at the
authentication section.

You might also like