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