I have a problem where MySQL (running on Ubuntu 12.04 with all latest updates) dies after a few days so put this script into a cron job that runs as root every 60 seconds.
I have mysql installed (from repos) on a development machine (laptop) and I don't need the daemon running on every boot. I've copied /etc/init/mysql.conf to /etc/init/mysql.conf.old and then removed everything following the "start on" line.
I know the commands to restart/stop/start but when I try to pass options it doesnt seem to work!
service mysql restart
service httpd restart
then I tried this
/etc/init.d/mysql --log /my/log/path.log
doesnt work either =/
Update: Apparently I cant run mysqld as root because of security issues
I have 2 webservers and 5 mysql servers.
Our website has a lot of traffic and one of the mysql servers goes down or gets flooded and i need to restart it (/etc/init.d/mysql restart).
Can i do it via PHP script (runing ssh command via php or something?)
Thank you
A bit ago, I moved my mysql directory from /var/lib/mysql to /home/lib/mysql. In those steps I created a symlink
ln -s /home/lib/mysql/mysql.sock /var/lib/mysql/mysql.sock
Which worked great. Today, I had to restart mysql through WHM. When I do, it says it failed and mysql isn't running. Trying again doesn't work.
Hi Guys,
I need bash script to restart the service.
1. Disable the service called SASM
svcadm disable sasm
2. if service went to maintenance mode then it shuld clear it with below command
svcadm clear sasm
3.or else it should restart the mysql service
/etc/init.d/mysql stop
/etc/init.d/mysql start
4. finally start the SASM
svcadm enable sasm
I have MySQL 5.5 running on Ubuntu Server 12.10.
About once per day the MySQL daemon crashes. Restarting with service mysql restart or service mysql start produces a "job failed" message. MySQL can only be restored by rebooting the instance.
Suddenly and without any reason mysql stopped working.
netstat -tap
does not list the mysql process. I tried
/etc/init.d/mysql restart|start
But his produces an error message:
/etc/init.d/mysql: error reading input file: Input/output error
Any ideas what happend and how do I fix this problem?