Modify the root user password of the MySQL database and open the remote user under the Linux system

Source: Internet
Author: User

First enter the terminal

1. Enter the following command to display the MySQL process number

Ps-a |grep-i MySQL

2. Enter the following command to kill the process shown above

Kill-9 Process number 1 process number 2

3. Enter the following command to enter MySQL security mode

Mysqld_safe--skip-grant-tables &

4, enter the following command to modify the password, note that the end of the semicolon must have, each input line to enter

Use MySQL;

Update user Set Password = password (' Your password ') where user = ' root ';

Exit

5. Enter the following command to start MySQL

Service MySQL Start

6. Successful modification


Turn on remote users

First, follow the above steps to enter Safe mode under Terminal

1. Enter the following command

Mysql-u Root

2. Re-enter

Use mysql; enter

GRANT All privileges on * * to ' test ' @ ' 192.168.0.109 ' identified by ' Testpassword '; Enter

flush Privileges; Enter

exit; Enter

This is the successful addition of the user test, the password is Testpassword, he can use the IP address of 192.168.0.109 host on the connection database








Modify the root user password of the MySQL database and open the remote user under the Linux system

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.