Linux安装多个MySQL
2008-09-06 11:09:46 来源:WEB开发网[myisamchk]
key_buffer = 8M
sort_buffer_size = 8M
[mysqlhotcopy]
interactive-timeout
[root@ff_girl mysql5122]#
启动两个MYSQL服务
[root@ff_girl mysql5122]# /usr/local/mysql5122/bin/mysqld_multi --config-file=/etc/my5122.cnf start 1-2
[root@ff_girl mysql5122]# netstat -an | grep 3307
tcp 0 0 0.0.0.0:3307 0.0.0.0:* LISTEN
[root@ff_girl mysql5122]# netstat -an | grep 3308
tcp 0 0 0.0.0.0:3308 0.0.0.0:* LISTEN
[root@ff_girl mysql5122]# /usr/local/mysql/bin/mysql -uroot -p -S/tmp/mysql1.sock
Enter password:
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 1
Server version: 5.1.22-rc-log MySQL Community Server (GPL)
Type 'help;' or 'h' for help. Type 'c' to clear the buffer.
mysql> q
Bye
[root@ff_girl mysql5122]# /usr/local/mysql/bin/mysql -uroot -p -S/tmp/mysql2.sock
Enter password:
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 1
Server version: 5.1.22-rc-log MySQL Community Server (GPL)
Type 'help;' or 'h' for help. Type 'c' to clear the buffer.
mysql> q
Bye
[root@ff_girl mysql5122]#
更多精彩
赞助商链接