Mysql???????????????????
???????????? ???????[ 2015/9/11 13:42:00 ] ?????????????
?????????з?????????????????????????????????????????mysql???????и??????????????????????????
??????????????????????????????????????????????????????????????????????У?????????е????????..
??????????????л???
???????mysqld_multi??????mysqld?????????????????ж????????á??????????????????????????(?????socket)??
??????????
????1 ???????????
????mysql_install_db --datadir=/web/mysql/prd/data --user=mysql
????mysql_install_db --datadir=/web/mysql/dev/data --user=mysql
????//????????????????????е?
????2 ???????????
multi.cnf??
#multi server
[mysqld_multi]
mysqld = /home/root/local/mysql/bin/mysqld_safe
mysqladmin = /home/root/local/mysql/bin/mysqladmin
#mysqld_multi log
log = /web/mysql/multi.log
#?????????????mysqld_multi??????????mysqladmin(??????????????????????????)
#user=root
#password=
#dev server
[mysqld3306]
user = mysql
port = 3306
socket = /web/mysql/dev/var/mysql.sock
pid-file = /web/mysql/dev/var/mysqld.pid
log-error = /web/mysql/dev/var/mysqld.log
datadir = /web/mysql/dev/data
max_connections = 200
default-storage-engine = innodb
character_set_server = utf8mb4
#prd server
[mysqld3307]
user = mysql
port = 3811
socket = /web/mysql/prd/var/mysql.sock
pid-file = /web/mysql/prd/var/mysqld.pid
log-error = /web/mysql/prd/var/mysqld.log
datadir = /web/mysql/prd/data
max_connections = 1000
default-storage-engine = innodb
character_set_server = utf8mb4
????3 ????????
????mysqld_multi --defaults-extra-file=multi.cnf start
????4 ????????
??????????????
????mysqld_multi --defaults-extra-file=multi.cnf report
??????????????????????飺
????netstat -ntlp tcp
????tcp 0 0 :::3306 ::: * LISTEN 3919/mysqld
????tcp 0 0 :::3307 ::: * LISTEN 15027/mysqld
?????????????
????mysqld_multi --defaults-extra-file=multi.cnf stop
???????????(?????????)??
????mysqladmin -uroot -S /web/mysql/prd/var/mysql.sock password 123456
????????????????
????mysql -uroot -S /web/mysql/prd/var/mysql.sock -p
????????????
????mysqld_multi????????????????????report?????????????С?
???????mysql?????????д????????????????????????mysql:mysql??????飬??????д????
????????????????????mysqld_multi stop????Ч
??????? mysqld????????????????????mysqld_multi????????????????(??multi.conf)?????????????????
????TIPS
????msyqld_multi??????????????????????飬????????????multi.log(?????????)???????????????????????У?
??????????????????????msyqld3307??3307????????????
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11