Similar to other Linux versions!!!
Modify MySQL Login settings
Vim/etc/my.cnf
For example:
[Mysqld]
Datadir=/var/lib/mysql
Socket=/var/lib/mysql/mysql.sock
Skip-grant-tablesAdd this line
Save and exit.
2. Restart Mysqld
Service Mysqld Restart Restart Services Method 1
/etc/init.d/mysqld Restart Restart Service Method 2
Show Restart Service Successful
stopping MySQL: [OK]
Starting MySQL: [OK]
3. Go to MySQL
/usr/bin/mysql
4. Select a database user
mysql> use MySQL;
Database changed
5.: Reset MySQL Password
mysql> UPDATE user SET Password = Password ( ' New-password '
The yellow part is the new password, the root user behind
6. Reset Permissions Table
mysql> flush privileges;
Query OK, 0 Rows affected (0.01 sec)
7. Exit mysql
mysql> Quit
8.
vim/etc/my.cnf
will just be in [ MYSQLD], add the skip-grant-tables delete
9,. restart mysqld
# Service Mysqld restart
10. Restart success
Stopping MySQL: [OK]
Starting MySQL: [OK]
11.mysql Login
Mysql-u root-p
Enter the new password you just set
This article is from the "high-tech blog" blog, please be sure to keep this source http://gaopengju.blog.51cto.com/12830710/1941548
[email protected] crack password