Each time Ubuntu is starting I need to run a script, which is running some SQLs.So I need run it after MySQL already started.Where should I put such script?
Ubuntu: where add a script executing SQL on machine start?
ubuntu;mysql;startup
file sould be place in /etc/init.d, and a link make in /etc/rc2.d (assuming you are in run level 2 (see who -r).The link sould be in the form S99sql, all files in rc2.d are run in alphabetical order.to sum up, create tour file in /etc/init.d/mysqlcmd.shthen change directory to /etc/rc2.d ans ln -s ../init.d/mysqlcmd.sh S99mysql