Build Station NOTE 2-database password modification and use of phpMyAdmin

Source: Internet
Author: User
Tags phpmyadmin

First, MySQL change password

In MySQL MySQL database, the user table puts the database users and their permissions information

1. You can find this table change data in phpMyAdmin (not recommended), because the database is placed in a password with encryption

2. Using login mysql, modify with sql command

1) Login

Just install the space-time password/opt/lampp/bin/mysql-u root If you change the password, you will need to enter the password/opt/lampp/bin/mysql-u root-p your password

2) Change Password

mysql> use MySQL; mysql> Update user Set Password=password ("123456″) where user= ' root '; mysql> flush Privileges; Mysql> quit

3)/opt/lampp/lampp Restart or restart the database directly

4) Modify the values below in the/opt/lampp/phpmyadmin/config.inc.php

$cfg [' Servers '] [$i] [' user '] = ' root '; $cfg [' Servers '] [$i] [' password '] = ' 123456 ';

Ii. phpmyadmin settings 1. Enter the database password for each entry

Modify the following value in the/opt/lampp/phpmyadmin/config.inc.php

$cfg [' Servers '] [$i] [' auth_type '] = ' http ';

Third, the database password modification error or forget

1. Stop MySQL first or stop xampp directly

/opt/lampp/lampp stopmysql/opt/lampp/lampp Stop

2. Start MySQL safely with mysqld

/opt/lampp/sbin/mysqld--skip-grant-tables &

Note that the directory is mysqld under the sbin directory

3. Then hit enter and return to the command prompt, you can log in to the MySQL database with a null password root

/opt/lampp/bin/mysql-u Root

Set it to the new root password.

mysql> use MySQL; mysql> Update user Set Password=password ("123456″) where user= ' root '; mysql> flush Privileges; Mysql> quit

Restart MySQL

/OPT/LAMPP/LAMPP restart

Build Station NOTE 2-database password modification and use of phpMyAdmin

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.