How to retrieve root user permissions of MariaDB database in centos _ MySQL

Source: Internet
Author: User
How to retrieve the root user permission of the MariaDB database in centos: MariaDBCentOS

A few days ago, I strolled around the internet and saw an article saying that MySQL itself was swallowed up by Orcle, which meant abandoning the MySQL community open source and dividing MySQL into community and enterprise edition. I am suffering from money TM. the founder of MySQL started to create MariaDB, which is named second to that of another girl. for a moment, MariaDB was abolished on centos.

Yesterday's rest, nothing to do, even more into the night, coupled with hot, sleep. boot centos, check the installed MariaDB the day before, the root has no password, login password. as a result, there are five root names in the user table, so only one host is set to %, and all the remaining names are deleted. if you do not find it, replace it with host = localhost. I don't know how easy it is.

Wait out and re-enter MariaDB. the Mysql database is invisible. under Google's investigation, it was caused by a local login. the original user table uses root as an artifact, and Yu Yichen. when the host is localhost, the permission is lost, so Mysql does not exist.

Google has tried this method and cannot solve it. du Niang returned to Mysql using the skip-grant-tables method or solution. try and fail. although MariaDB is the same as MySQL, it is not completely the same and cannot be resolved.

I tried it with-h 127.0.0.1 for a long time, but I had a lot of gains even if I lost. in this way, the address of the local machine uses 127.0.0.1 and localhost as the rope. if you want to change the IP address of centos, try again. cheng Yi.

Stand up, restore the authority of its localhost. withdraw and re-enter Mysql now. this problem is solved.

Ps: Mr. Ye, a generation of masters. cloud: you will never forget it, but it will always echo. if you do not bully me, too.

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.