MySQL的启动方式
方式一:
[root@vast1 ~]# service mysql start
[root@vast1 ~]# ps -ef|grep mysql
root 41187 1 0 15:00 pts/3 00:00:00 /bin/sh /usr/local/mysql/bin/mysqld_safe –datadir=/data/mysql/mysql3306/data –pid-file=/data/mysql/mysql3306/data/mysql.pid
mysql 42119 41187 1 15:00 pts/3 00:00:00 /usr/local/mysql/bin/mysqld –basedir=/usr/local/mysql –datadir=/data/mysql/mysql3306/data –plugin-dir=/usr/local/mysql/lib/plugin –user=mysql –log-error=/data/mysql/mysql3306/data/error.log –open-files-limit=65535 –pid-file=/data/mysql/mysql3306/data/mysql.pid –socket=/tmp/mysql3306.sock –port=3306
方式二:
[root@vast1 ~]# mysqld –defaults-file=/data/mysql/mysql3306/my3306.cnf &
[root@vast1 ~]# ps -ef |grep mysql
mysql 42238 40968 4 15:03 pts/3 00:00:00 mysqld –defaults-file=/data/mysql/mysql3306/my3306.cnf
方式三:
[root@vast1 ~]# mysqld_safe –defaults-file=/data/mysql/mysql3306/my3306.cnf &
[root@vast1 data]# ps -ef|grep mysql
root 43298 40968 0 15:11 pts/3 00:00:00 /bin/sh /usr/local/mysql/bin/mysqld_safe
mysql 44204 43298 0 15:11 pts/3 00:00:00 /usr/local/mysql/bin/mysqld –basedir=/usr/local/mysql –datadir=/data/mysql/mysql3306/data –plugin-dir=/usr/local/mysql/lib/plugin –user=mysql –log-error=/data/mysql/mysql3306/data/error.log –open-files-limit=65535 –pid-file=/data/mysql/mysql3306/data/mysql.pid –socket=/tmp/mysql3306.sock –port=3306