mysql server not starting

Am trying to start my MYSQL server but its not starting it take long time to throw error  and  its keep failing , i tried to start with

 service mysql start
service mysql restart
/etc/init.d/mysql start
Supporter Asked on January 28, 2017 in Software.
Add Comment
1 Answer(s)
Best answer

Hmmm mysql take long time with start or restart command can be issue of log file , in case when log file are too big this occur , solution is simple you just need to delete log files as you may have not limited log file size from my.cnf config file which you should do to avoid this in future ..

so goto mysql data directory or if you do not know about your mysql data directory you can open my.cnf config file and then look for

nano /etc/mysql/my.cnf    #   mysql config file my.cnf

datadir         = /usr/local/mysql/data/

so in my case it will be


cd /usr/local/mysql/data/

now remove error log and other log files

 

rm mysql-error.log
rm ib_logfile0

rm ib_logfile1

 

now try to start mysql server with


service mysql restart

if mysql server start goes ok then you edit my.cnf and below lines it end of file to limit log files size

 

# LOGGING #

log-error = /usr/local/mysql/data/mysql-error.log

slow-query-log = 1

slow-query-log-file = /usr/local/mysql/data/mysql-slow.log
#relay log restrictions

relay-log-space-limit=10M

 

Supporter Answered on January 28, 2017.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.