0% found this document useful (0 votes)
17 views

Reset Mysql Password

The document provides instructions for resetting the MySQL root password in XAMPP to improve security. It outlines 4 steps: 1) Ensure MySQL server is running, 2) Open command prompt, 3) Use mysqladmin command with syntax to change password, 4) Test connection with new password.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

Reset Mysql Password

The document provides instructions for resetting the MySQL root password in XAMPP to improve security. It outlines 4 steps: 1) Ensure MySQL server is running, 2) Open command prompt, 3) Use mysqladmin command with syntax to change password, 4) Test connection with new password.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Reset the MySQL Root Password

By default, the MySQL installation that ships with XAMPP has an empty root password. This is a serious
security risk, especially if you plan to use XAMPP in production scenarios.
To change the MySQL root password, follow these steps:
1. Ensure that the MySQL server is running.
2. Open your Windows command prompt by clicking the "Shell" button in the XAMPP control panel.

3. Use the mysqladmin command-line utility to alter the MySQL password, using the following syntax:
mysqladmin --user=root password "newpassword"

For example, to change the MySQL root password from its default empty value to the password gue55me,
you would execute:
mysqladmin --user=root password "gue55me"

Or, if a password has already been previously set and youd like to change it to a new one, you can use the
following syntax:
mysqladmin --user=root --password=oldpassword password "newpassword"

For example, to change the root password from 12345 to gue55me, you would execute:
mysqladmin --user=root --password=12345 password "gue55me"

4. Test that your password change has been accepted, by attempting to connect to the MySQL server using
the mysql command-line client in the same directory. For example, you could use the command below to
connect to the server and return the results of a calculation:
mysql --user=root --password=gue55me -e "SELECT 1+1"

You might also like