[mysql] “Failed to start MySQL Server” error resolution

The attention! Attention! Attention! The following operation, please read and then decide on your own whether to adopt this recommendation!
.
.
, then the text begins
drummed up mysql again recently, met a haven’t seen before.
the problem are as follows:


baidu for a long time, found that the articles are the same, the solutions are almost the same, but in here I have no use.
so looked over the wall of the outside world, finally found a useful solution.


mysql at initialization time, directory will detect whether there is if not, mysql creates it if there is, and the data are there in this directory, mysql complains, initialization and termination of if none of the above problems, it may be that the folder permissions problems solution (here in my operation path, for example, specific please refer to our own path) :


2, through the above we can see :datadir path and socket path.
.

chmod -R 777 /var/lib/mysql

3, next delete /var/lib/mysql folder contents :

rm -rf /var/lib/mysql/*

4, restart service :

service mysqld restart

at this point, if you look at the status, you can see mysql is up :

Read More: