MySQL forgot password, support Chinese, TAB complete

Source: Internet
Author: User

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

Related Article

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.