Starting the MySQL automatically when the system starts up would be very convinient. Automating this process with a script will insure consistency in the process.
If the Downloading and Installing
MySQL exercise was successfully completed, then the script named
mysql.server has been installed.
mysql.serverroot find the mysql.server script.#find / -name mysql.server -print
mysql.servermysql.server was found.mysql.server into the init.d directory.#cp mysql.server /etc/init.d/mysql
#chmod +x /etc/init.d/mysql
chkconfig to activate it to run at system startup.#chkconfig --level 345 mysql on
#chkconfig --list mysql
#/etc/init.d/mysql stop
#reboot
root.$mysql -u root mysql
mysql>SHOW VARIABLES
mysql>SHOW CHARACTER SET LIKE 'latin%'
mysql>SHOW ENGINES
mysql>QUIT
Congratulations! You have successfully automated the start up of the MySQL server.