- hack and reset mysql password
Password this thing, always have to forget the time, or is suddenly not recorded, or is the hand of the handover when no one told you, or old to even old leader also forget the database, the problem is to use or to use, then it cracked Bai.
#先关闭mysqlservice mysqld stop# Enter Safe mode, can be password-free login/usr/local/mysql/bin/mysqld_safe--skip-grant-tables--skip-networking & #免密码登陆/usr/local/mysql/bin/mysql-uroot# Change password, password and user selectable, choose what user environment you want to update mysql.user set Password=password (' New password ') where user= ' root ' and host= ' root ' or host= ' localhost ' or host= ' localhost.localdomain ' or host= ' 127.0.0.1 '; After 5.7, update the Mysql.user set Authentication_string=password (' New password ') with the new field, where user= ' root '; #刷新策略flush privileges;# Restart Mysql/etc/init.d/mysqld restart# Normal login/usr/local/services/mysql/bin/mysql-uroot-p ' new password ' #测试功能是否正常mysql > show Databases
It's also simple, but keep in mind that you don't affect existing data.
Hack and reset MySQL password