Forgot MySQL Password:
(1) Suspension of service:
/etc/init.d/mysqld Stop
(2) Skip Grant table authorization, enter Safe mode, and run in the background:
Mysqld_safe--skip-grant-tables &--skip-grant-tables--defoults-file=/data/3306/ MY.CNF & #多实例jobs[ 1]+ Running mysqld_safe--skip-grant-tables &
(3) Enter Safe mode to change password
mysqlmysql> Use mysql; #进入mysql库mysql>update user set Password=password (123123) where user=' Root'; Modify password password encryption user mysql> flush privileges; #刷新
(4) Restart the service with the new password login;
/etc/init.d/-uroot-p123123
Using the TAB key to complete the function in MySQL
(1) Modifying the master configuration file
vim/etc/my.cnf changed to [MySQL] #no-auto-rehashauto-
(2) Restart the service login test
/etc/init.d/mysqld Restart
Mysql-uroot-p--auto-rehash #临时支持tab键
MySQL supports Chinese
Temporary support within MySQL
Mysql> CharSet UTF8; Charset Changedmysql>
Permanent support for modifying a master file
vim/etc/my.cnf[client]default-character-set=utf8....................[ Mysql]default-character-set=
Restart Service
MySQL forgot password, support Chinese, tab complete