MySQL Problem 2

Source: Internet
Author: User
Tags log log mysql download mysql view

I really have the development of Linux under the food Ah, continue to record learning MySQL problems.

Because yesterday according to the online tutorial to the MySQL root (localhost) password changed can not login, and according to the online tutorial user= ' Users also deleted, and finally when I began to understand MySQL about users and permissions of some things, I mysqld_safe- User=mysql--skip-grant-tables--skip-networking & After entering the MySQL view system users, found no host name for localhost users ...

Although the root password for other host names has been set to "*23ae809ddacaf96af0fd78ed04b6a265e05aa257" is encrypted "123", I am trying to log in with these user identities and find no real root permissions. Insert a root user with a host name of localhost, and find that permissions are also problematic ...

Simply delete MySQL and reload it. Review the deletion process:

To delete a package: rpm-e Mysql-server//The order is in order, and you must first delete packages that do not depend on other packages

Delete Package: Rpm-e mysql*******//Otherwise the system will not be prompted to delete, I was struck by the deletion of 4 packages in turn

Delete Package: Rpm-e l********

Delete Package: Rpm-e mysql*******

Sister home speed is very good, so direct yum install MySQL download speed 600kb~~~~

Oh, and yum install Mysql-devel and yum install mysql-server Dozens of seconds are all packed.

Start Mysql:service mysqld start ... Ah, there it is: redirecting To/bin/systemctl start Mysqld.service

Job failed. The system journal and ' systemctl status ' for details. All right, check it out. LOG:/var/log/mysqld.log Log said: Mysqld_safe A mysqld process already exists ....

I really do not understand what this stuff, had to ps-a|grep MySQL and then kill-9 process number.

Again mysql-u root, well, finally landing to MySQL, but also have to set a password.

Just discovered before learning the online update user set password = ' 123456 ' where user = ' root '//This is wrong, the password is actually not 123456

Should be update user set password = password (' 123456 ') where user = "root";

Restart MySQL service, with root and password 123 login success, and then:

Grant all privileges in *.* to ' root ' @ '% ' identified by ' root ' with GRANT OPTION;

To give all users remote connection permissions, 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.