MySQL Modify user password!

Source: Internet
Author: User

#1. Stop the MySQL database/etc/init.d/mysqld stop  #2. Execute the following command mysqld_safe --user=mysql --skip-grant-tables  --skip-networking &  #3. Log in to the MySQL database mysql -u root mysql  #4 using root. Update Root password mysql> update user set authentication_string = password  (  ' New-password '  )  WHERE User =  ' root '  ; #5. Refresh Permissions  mysql> FLUSH  privileges;  #6. Exit mysqlmysql> quit  #7. Restart the mysql/etc/init.d/mysqld restart  #8. Use the root user to log back in mysqlmysql -uroot -p enter password: < Enter the new password newpassword>   --prompt error 1819  (HY000) When changing password:  your password does not satisfy the  current policy requirements need to modify the value of Validate_password_policy:mysql> set global  validate_password_policy=0; see mysql> select @ @validate_password_length;    -- When uninstalling MySQL hint Error reading informAtion on service mysqld: invalid argument can use the command: rpm -e --nopreun -- nopostun  --nodeps   mac mysql error you must reset  your password using alter user statement before executing this  Statement. After installing mysql , after landing, regardless of running any command, always prompt this  step 1: set password = password ( ' Your new password '); step 2: alter user  ' root ' @ ' localhost '  password  EXPIRE NEVER; step 3: flush privileges;

MySQL Modify user password!

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.