Reputation: 341
I delete all file in /var/log, however, when I restart mysql service, it failed to start now. help!
Rather than invoking init scripts through /etc/init.d, use the service(8) utility, e.g. service mysql restart
Since the script you are attempting to invoke has been converted to an Upstart job, you may also use the stop(8) and then start(8) utilities, e.g. stop mysql ; start mysql. The restart(8) utility is also available. start: Job failed to start
Upvotes: 1
Views: 7370
Reputation: 4291
You can re-create the "log pool" yourself
mkdir /var/log/mysql
And give it full access
chmod -R 777 /var/log/mysql
Now restart your db server
service mysql start
or
/usr/sbin/mysqld
Upvotes: 1
Reputation: 341
try running mysqld using
/usr/sbin/mysqld
i have once come across this problem. i.e. my mysql says Job can't start
.I don't know why but it started after
sudo dpkg-reconfigure mysql-server-5.5
/usr/sbin/mysqld
May be there is some bug on service
routine.
Upvotes: 0
Reputation: 11
Maybe your my.cnf is "world wide writable" ? Check permissions. It should be like 755... NOT 777.
Upvotes: 1
Reputation: 715
Try creating Directory Manually & Assign the Permission to Mysql.
Ex. mkdir /var/log/mysql
Chown -R mysql:mysql /var/log/mysql
& Restart the mysql Service again it might be slove your problem.
Upvotes: 8