#mkdir/home/mysql_servers/mysql330{7,8,9}-P
#useradd-G MySQL mysql3307-s/bin/nologin-d/home/mysql_servers/mysql3307
#tar XF mysql.tar.gz
#cd mysql/
#./configure--prefix=/home/mysql_servers/mysql3307
#make
#make Install
#cp mysql3307/share/mysql/my-medium.cnf mysql3307/my.cnf
#vi MYSQL3307/MY.CNF--in the following part of the revised place
[Client]
#password= Your_password
Port= 3307
Socket=/tmp/mysql3307.sock
[Mysqld]
Port= 3307
Socket=/tmp/mysql3307.sock
DataDir =/home/mysql_servers/mysql3307/data
Log-error =/var/log/mysqld3307.log--The error log file is typed for troubleshooting
Pid-file =/home/mysql_servers/mysql3307/3307.pid
Log-bin=/home/mysql_servers/mysql3307/data/mysql-bin
Initialization of the database:
#/home/mysql_servers/mysql3307/bin/mysql_install_db--basedir=/home/mysql_servers/mysql3307/--datadir=/home/ Mysql_servers/mysql3307/data--user=mysql3307
Start MySQL:--Be sure to note that the configuration my.cnf the error log,
#/home/mysql_servers/mysql3307/bin/mysqld_safe--DEFAULTS-FILE=/HOME/MYSQL_SERVERS/MYSQL3307/MY.CNF--user= MYSQL3307 &
To turn off the MySQL service:
#/home/mysql_servers/mysql3307/bin/mysqladmin-uroot-p-s/tmp/mysql3307.sock shutdown
This article is from the "Stone" blog, please be sure to keep this source http://dodowolf.blog.51cto.com/793581/1572698
Single server multiple MySQL server