3 ways to start mysql

1、mysqld

start mysql:./mysqld –defaults-file=/etc/my.cnf –user=root

client connect:

mysql –defaults-file=/etc/my.cnf or mysql -S /tmp/mysql.sock

2、mysqld_safe

start mysql: ./mysqld_safe –defaults-file=/etc/my.cnf –user=root &

client connect:

mysql –defaults-file=/etc/my.cnf or mysql -S /tm/mysql.sock

3、mysql.server

cp -v /usr/local/mysql/support-files/mysql.server /etc/init.d/

chkconfig –add mysql.server

start mysql: service mysql.server {start|stop|restart|reload|force-reload|status}

Leave a Reply