Four ways to start MySQL: 1, mysqld start MySQL server:./mysqld--defaults-file=/etc/my.cnf--user=root Client connection: MySQL--defaults-file=/etc/ My.cnformysql-s/tmp/mysql.sock 2, mysqld_safe start MySQL server:./mysqld_safe--defaults-file=/etc/my.cnf--user= Root & Client connection: MySQL--defaults-file=/etc/my.cnformysql-s/tm/mysql.sock 3, mysql.servercp-v/usr/local/mysql /support-files/mysql.server/etc/init.d/chkconfig--add mysql.server start MySQL server: Service mysql.server {start|stop| Restart|reload|force-reload|status} client connections: Same as 1, 2 4, Mysqld_multimkdir $MYSQL _base/data2cat <<-EOF>> /etc/my.cnf[mysqld_multi]mysqld =/usr/local/mysql/bin/mysqld_safemysqladmin =/user/local/mysql/bin/ Mysqladminuser = Mysqladminpassword = mysqladmin [mysqld3306]port = 3306SOC Ket =/tmp/mysql3306.sockpid-file =/tmp/mysql3306.pidskip-external-lockingkey_ Buffer_size = 16mmax_allowed_packet = 1mtable_open_cache = 64sort_buffer_size = 512knet_buffer_lengtH = 8kread_buffer_size = 256kread_rnd_buffer_size = 512kmyisam_sort_buffer_size = 8Mbasedir =/usr/local/mysqldatadir =/u Sr/local/mysql/data [mysqld3307]port = 3307socket &NBS P =/tmp/mysql3307.sockpid-file =/tmp/mysql3307.pidskip-external-lockingkey_buffer_size = 16Mmax_allowed_ Packet = 1mtable_open_cache = 64sort_buffer_size = 512knet_buffer_length = 8kread_buffer_size = 256Kread_rnd_buffer_size = 512kmyisam_sort_buffer_size = 8Mbasedir =/usr/local/mysqldatadir =/usr/local/mysql/data2eof #mysql-S/tmp/ Mysql3306.sockmysql>grant SHUTDOWN on * * to ' mysqladmin ' @ ' localhost ' identified by ' mysqladmin ' with GRANT OPTION;&NB SP; #mysql-S/tmp/mysql3307.sockmysql>grant SHUTDOWN on * * to ' mysqladmin ' @ ' localhost ' identified by ' mysqladmin ' wit H Grant option; start MySQL server:./mysqld_multi--defaults-file=/etc/my.cnf start 3306-3307 shut down MySQL server: mysqladmin shutdown can refer to <>http://dev.mysql.com/doc/refMan/5.1/zh/database-administration.html#server-side-scripts
Several ways to start MySQL