Skip to main content

Posts

Showing posts from May, 2012

MySQL automatic startup script in Ubuntu

Check for mysql installed scripts: sudo ls -l /etc/rc?.d/*mysql Remove if any: sudo update-rc.d -f mysql remove Copy template script to init.d directory: sudo cp /support-files/mysql.server /etc/init.d/mysql (under mysql script, change basedir if different from /usr/local as stated in the script comments) Make it executable: sudo chmod +x /etc/init.d/mysql Create run level scripts automatically: sudo update-rc.d mysql defaults Try restarting your server, it should start / stop mysql automatically now. If you want to start/stop mysql manually: sudo /etc/init.d/mysql start