Mysql Question 2

Source: Internet
Author: User
Tags mysql download
I was still very comfortable with the development in linux. I continued to record the problems in mysql. The root (localhost) password of mysql cannot be logged in according to the online tutorial yesterday, and the User's User is also deleted according to the online tutorial, finally, when I started to understand mysql's user and permission information, I am mysqld_safe -- us

I was still very comfortable with the development in linux. I continued to record the problems in mysql. The root (localhost) password of mysql cannot be logged in according to the online tutorial yesterday, and the User = User is also deleted according to the online tutorial, finally, when I started to understand mysql's user and permission information, I am mysqld_safe -- us

I was still very comfortable with the development in linux. I continued to record the problems in mysql.

The root (localhost) password of mysql cannot be logged in according to the online tutorial yesterday, and the User = ''is also deleted according to the online tutorial, finally, when I began to understand mysql's user and permissions, I am mysqld_safe -- user = mysql -- skip-grant-tables -- skip-networking & and then enter mysql to view the users of the system. I found that there are no users whose host name is localhost...

Although the root user password of other host names has been set to "* 23AE809DDACAF96AF0FD78ED04B6A265E05AA257", it is encrypted "123", but I try to use these user identities to log on without real root permissions. You can insert a root user whose host name is localhost and find that the permission is also incorrect...

Simply delete mysql and reinstall it. Review the deletion process:

Delete a software package: rpm-e mysql-server // This command is ordered. You must first delete a software package that does not depend on other software packages.

Delete a software package: rpm-e mysql ******* // otherwise, the system will prompt that the software cannot be deleted. In my impression, four software packages are deleted in sequence.

Delete a software package: rpm-e l ********

Delete a software package: rpm-e mysql *******

Sister's home network speed is very good, so the direct yum install mysql download speed is 600kb ~~~~

Oh, yum install mysql-devel and yum install mysql-server have been installed in dozens of seconds.

Start mysql: service mysqld start ...... Ah, the following error occurs: Redirecting to/bin/systemctl start mysqld. service.

Job failed. See system journal and 'systemctl status' for details. Let's take A look at the log:/var/log/mysqld. log: mysqld_safe A mysqld process already exists ....

I really don't know what this is, so I had to ps-A | grep mysql and then kill-9 process number.

Mysql-u root again. Well, I finally logged on to mysql again, but I still have to set a password.

I just found that the previous online update user set password = '000000' where user = "root" // This is incorrect. The password is not 123456.

Set password = password ('000000') where user = "root ";

Restart the mysql service and log in successfully with the root and password 123. Then:

Grant all privileges on *. * TO 'root' @ '%' identified by 'root' with grant option;

To grant all users the remote connection permission, and finally succeeded (* ^__ ^ *)

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.