How MySQL (mariadb) changes the root password

Source: Internet
Author: User

MySQL (or mariadb, she is a branch of MySQL, completely open source, the new version of the Linux system is installed by default mariadb) How to change the root password? We mainly introduce command mysqladmin to implement.

MySQL (mariadb) How to change the root password, the first step is to switch to the root user:

 

MySQL (mariadb) How to change the root password, mainly using the Mysqladmin command, see the Picture:

 

To explain:
-U root, which is the specified user, specifying the password to modify the root user.
-p password is the password option, and the newpasswd behind it is the new password.
The results of the implementation are as follows:

 


After MySQL (mariadb) changes the root password, try not to enter the password into the database:

 

MySQL (mariadb) How to change the root password, now enter a normal password login:

 


Password entered correctly, log in to the database!

How MySQL (mariadb) changes the root 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.