Centos6.5@mysql hack Password

Source: Internet
Author: User

Similar to other Linux versions!!!

    1. 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

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.