日期:2014-05-16 浏览次数:20908 次
useradd mysql tar xzvf mysql-.1.55.tar.gz cd mysql5.1.55 ./configure --prefix=/usr/local/mysql --with-extra-charsets=all --exec-prefix=/usr/local/mysql --with-plugins=all make && make install cd /usr/local/mysql/ chown -R mysql:mysql cd /usr/local/src/mysql-5.1.55/support-files cp my-medium.cnf /etc/my.cnf
mysql_install_db --basedir=/usr/local/mysql --datadir=/var/lib/mysql-3308 --user=mysql mysql_install_db --basedir=/usr/local/mysql --datadir=/var/lib/mysql-3307 --user=mysql
[mysqld_multi] mysqld = /usr/local/mysql/bin/mysqld_safe mysqladmin = /usr/local/mysql/bin/mysqladmin user = root //这个用户和密码是用来关闭mysql服务的 password = wxseio [mysqld3307] #其中 port ,socket, # pid-file,datadir #这四个参数必须不同,其余可以根据自己选择设置。 datadir = /var/lib/mysql-3307 socket = /var/lib/mysql-3307/mysql.sock pid-file = /var/lib/mysql-3307/mysqld.pid user = root port = 3307 server-id = 100 [mysqld3308] datadir = /var/lib/mysql-3308 socket = /var/lib/mysql-3308/mysql.sock pid-file = /var/lib/mysql-3308/mysqld.pid user = root port = 3308 server-id = 200
mysqld_multi start 3007,3008 mysqld_multi stop 3307,3308
netstate -lanp|grep mysql