手动初始化一个mysql实例:
mysqld --initialize-insecure --user=mysql --datadir=/data/mysql/data3309 --basedir=/usr/local/mysql
重新编辑一个 my.cnf文件,需要需改里面的相关参数,如:
server-id = 803309
port = 3309
basedir = /usr/local/mysql
datadir = /data/mysql/data3309
tmpdir = /data/mysql/mysql_tmp
socket = /data/mysql/data3309/mysql.sock
手动启动 3309 这个实例:
mysqld_safe --defaults-file=/etc/my2.cnf --user=mysql --datadir=/data/mysql/data3309 --basedir=/usr/local/mysql --port=3309
nohup mysqld_safe --defaults-file=/etc/my2.cnf --user=mysql --datadir=/data/mysql/data3309 --basedir=/usr/local/mysql --port=3309 &
----------------------------------------------------------------------------
手动启动mysql
./mysqld_safe --user=mysql --basedir=/usr/local/mysql5.7 --datadir=/usr/local/mysql5.7/data &
mysqld_safe --user=mysql --basedir=/usr/local/mysql5.7 --datadir=/usr/local/mysql5.7/data --defaults-file=/etc/my.cnf
basedir=/usr/local/mysql5.7
datadir=/usr/local/mysql5.7/data