Solve the problem of Failed to start LSB: start and stop MySQL when starting mysql

Foreword:

When downloading the glibc version of Mysql, the following error occurred when starting the mysql service

There are many ways to search on the Internet: check the error log, or df -h to check whether the disk is full, etc., all of which have not been resolved. Later, the problem was solved after trying to re-initialize the database.

 Database initialization:

Before reinitializing the database, you need to delete the generated files in the /usr/local/mysql/data directory

ll /usr/local/mysql/data/
rm -rf /usr/local/mysql/data/*

Initialize the database with the following command:

/usr/local/mysql/bin/mysqld --initialize --user=mysql --datadir=/usr/local/mysql/data

Restarting the service runs successfully :) 

Guess you like

Origin blog.csdn.net/AChain1117/article/details/130046964