Gentoo MySQL not started (0) Solution

Source: Internet
Author: User

 

I recently used MySQL and upgraded it to the latest version through emerge. As a result, I encountered a small problem and posted the solution process here. I hope it will be helpful for children's shoes with similar problems.

 

1./etc/init. d/MySQL
Start starts MySQL and cannot be started. -- prompt: * MySQL datadir is empty or
Invalid
* Please check your my. CNF:/etc/MySQL/My. CNF --
Possible Cause Analysis: from the default MySQL installation in portage, the configuration file is 32-bit, And the datadir location is incorrect under 64-bit. 2. Open/etc.
/MySQL/My. CNF find and modify datadir: datadir =/usr/lib64/MySQL
# I changed it to/usr/share/MySQL. Actually, it cannot be -_-!!

 

3. Start MySQL again -- prompt: * MySQL not started (0) is started in "safe mode" of MySQL.
Mysql_secure_installation command -- prompt: * error 2002 (hy000): Can't
Connect to local MySQL server through socket
'/Var/run/mysqld. Sock' (2) -- possible cause analysis: permissions under the/var/run/mysqld directory
If there is a problem with the settings, change the socket value to/tmp/MySQL. socket or chmod 777.
/Var/run/mysqld (I have tried it and it works)

 

4. Modify the socket configuration in my. CNF to search for and modify: Socket =/tmp/mysqld. Sock

 

5. Start MySQL again ..

 

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.