"Urgent" Alibaba cloud ESC centos7.0 suddenly unable to link the database

Source: Internet
Author: User


Mariadb with Yum
It was good yesterday, and suddenly it got up in the morning.

Plus, last night a programmer built more than 60 fields in a single table.

Add:

MySQL doesn't start up.

Reply content:


Mariadb with Yum
It was good yesterday, and suddenly it got up in the morning.

Plus, last night a programmer built more than 60 fields in a single table.

Add:

MySQL doesn't start up.

Check the socket=[path in the mariadb configuration file (default/etc/my.cnf), yes/var/lib/mysql/mysql.sock

If not =/var/lib/mysql/mysql.sock, the parameters of the login should be added--socket= (assuming this is/tmp/mysql.sock):

mysql -uroot -p --socket=/tmp/mysql.sock

Default is/var/lib/mysql/mysql.sock

Your local MySQL process should be in the bar, then you can also ps-ef|grep MySQL to see the current socket path is how much.

Otherwise, Whereis MySQL looks at the environment variable, which is the MySQL command that loads which path.

Well, you do not have the MySQL process started, of course, can not log on, after the start of MySQL, or your command to
Service mysqld Start
Mysql-uroot-p
You look at it again

Generally, you use Yum this way to install directly, usually in the installation process in the/etc/init.d/download put a startup script.
But according to your quoted error, this script does not. The feeling that I had was deleted.

But also see you whereis MySQL, so I think you can try to go to the MySQL bin directory manually run MySQL try to start, if you can start, then write a simple script.

  • 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.