The mainstream UNIX system now has two styles: System V and BSD, and they differ as follows:
Linux as a class Unix, there are also these two styles, where CentOS belongs to System V, this article mainly describes how to start and shut down MySQL under CentOS (that is, System V style), and briefly describe the BSD system.
MySQL startup mode
1) direct call to Mysqld. This is the least common way and is not recommended for use.
2 Run Mysql.server Script
The Mysql.server script starts the server by calling Mysqld_safe, which can be started or closed by parameter start and stop.
Mysql.server script in the MySQL installation directory in the Share/mysql directory, if the source is installed MySQL, you can find in the Support-files directory. If you want to use Mysql.server, you must copy it to the appropriate run-level directory, as follows:
CP Mysql.server/etc/init.d/mysqld
chmod 755/etc/init.d/mysqld
Once configured, you can use the following command to start and close the MySQL instance:
Service Mysqld Start/stop
/etc/init.d/mysqld Start/stop
Use the Chkconfig command to configure startup to start automatically:
Chkconfig--add mysqld
Chkconfig mysqld on
Run the following command to check for proper activation:
[Root@data data]# chkconfig--list mysqld
Mysqld 0:off 1:off 2:on 3:on 4:on 5:on 6:off
MySQL shutdown mode
Mysqladmin-p-U root shutdown
See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/database/MySQL/