XAMPP resetting the MySQL password

Source: Internet
Author: User
Tags phpmyadmin

Find the installation location of XAMPP, here is my example: C:\xampp

So the path to MySQL: C:\xampp\mysql

Path to PhpMyAdmin: C:\xampp\phpMyAdmin

Modify MySQL password first step:

Turn off the MySQL service (stop) through the XAMPP Control Panel (XAMPP).

Step Two:

Open command line terminal, switch to directory: C:\xampp\mysql\bin

c:\windows\system32>cd C:\xampp\mysql\binC:\xampp\mysql\bin>mysqld--skip-grant-  Tables2018----------:4200  10.1.  + 5716 ...

After entering the command, the window will go into a state that cannot be manipulated, and MySQL will also start, keeping the command Line Terminal window in state and not shutting it down.

Step Three:

Open another command-line terminal and switch to directory: C:\xampp\mysql\bin

Enter the following command in turn:

C:\xampp\mysql\bin>Mysql.exe- u root # login Welcome to the MariaDB monitor with root user . Commands End With; or \g.your MariaDB connectionIDIs2Server Version:10.1. +-MariaDB mariadb.org binary distributioncopyright (c) -, ., Oracle, MariaDB Corporation Ab and others. Type'Help ;'Or'\h'  forHelp. Type'\c'ToClearThe current input statement. MariaDB [(none)]> use MySQL # using MySQL database changedmariadb [MySQL]>Update user Set Password=password ('root') where user='root' ; # Change Password Query OK,0Rows affected,3Warnings (0.00sec) Rows matched:3Changed:0Warnings:3MariaDB [MySQL]> flush Privileges; # Refresh Permissions Query OK,0Rows affected, AWarnings (0.02Sec

This allows us to successfully modify the MySQL password, which is set to root, but we also need to modify the phpMyAdmin configuration file in the database connection password to ensure that the database can be connected properly.

Modifying the phpMyAdmin configuration file

Modify the password that you want to set in C:\xampp\phpMyAdmin\config.inc.php.

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

Restart the MySQL service and you will be able to use the password for the new settings.

Xampp reset MySQL password

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.