[URGENT] Alibaba Cloud esccentos7.0 suddenly cannot connect to the database

Source: Internet
Author: User
Mariadb installed with yum is still good yesterday. It was suddenly added in the morning that a programmer created more than 60 fields in a table last night. The addition: mysql cannot be started.


Mariadb installed with yum
It was good yesterday. It suddenly occurred in the morning.

In addition, a programmer created more than 60 fields in a table last night.

Supplement:

Mysql cannot start

Reply content:


Mariadb installed with yum
It was good yesterday. It suddenly occurred in the morning.

In addition, a programmer created more than 60 fields in a table last night.

Supplement:

Mysql cannot start

Check whether/var/lib/mysql. sock is in the [path] of the mariadb configuration file (default/etc/my. cnf ).

If it is not =/var/lib/mysql. sock, add -- socket = To the login parameter (assuming it is/tmp/mysql. sock ):

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

The default value is/var/lib/mysql. sock.

The local mysql process should be here. You can also view the current socket path through ps-ef | grep mysql.

In addition, if the problem persists, whereis mysql will take a look at the environment variable, which path is the mysql command to load.

Well, you haven't started the mysql process here. Of course you can't log on to it. After starting mysql, just use your command.
Service mysqld start
Mysql-uroot-p
Let's take a look.

Generally, you can directly install it using yum. Generally, a STARTUP script is downloaded from/etc/init. d/During the installation process.
But according to the error you reported, this script does not exist. It seems to me that it is deleted.

However, you can see whereis mysql again, so I think you can try to manually execute mysql in the bin directory of mysql to start it. If you can start it, write a simple script on your own.

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.