這篇文章給大家介紹如何進(jìn)行MySQL多實(shí)例配置管理,內(nèi)容非常詳細(xì),感興趣的小伙伴們可以參考借鑒,希望對(duì)大家能有所幫助。
10年積累的成都做網(wǎng)站、成都網(wǎng)站建設(shè)經(jīng)驗(yàn),可以快速應(yīng)對(duì)客戶對(duì)網(wǎng)站的新想法和需求。提供各種問(wèn)題對(duì)應(yīng)的解決方案。讓選擇我們的客戶得到更好、更有力的網(wǎng)絡(luò)服務(wù)。我雖然不認(rèn)識(shí)你,你也不認(rèn)識(shí)我。但先制作網(wǎng)站后付款的網(wǎng)站建設(shè)流程,更有武宣免費(fèi)網(wǎng)站建設(shè)讓你可以放心的選擇與我們合作。[root@open_source 3309]# cat /mysql/3307/my.cnf [mysqld] user=mysql basedir=/usr/local/mysql datadir=/mysql/3307/data socket=/tmp/mysql3307.sock port=3307 server_id=7 [root@open_source 3309]# cat /mysql/3308/my.cnf [mysqld] user=mysql basedir=/usr/local/mysql datadir=/mysql/3308/data socket=/tmp/mysql3308.sock port=3308 server_id=8 [root@open_source 3309]# cat /mysql/3309/my.cnf [mysqld] user=mysql basedir=/usr/local/mysql datadir=/mysql/3309/data socket=/tmp/mysql3309.sock port=3309 server_id=9
mysqld --initialize-insecure --user=mysql --basedir=/usr/local/mysql --datadir=/mysql/3307/data/ mysqld --initialize-insecure --user=mysql --basedir=/usr/local/mysql --datadir=/mysql/3308/data/ mysqld --initialize-insecure --user=mysql --basedir=/usr/local/mysql --datadir=/mysql/3309/data/
[root@open_source 3309]# mysqld_safe --defaults-file=/mysql/3307/my.cnf & [root@open_source 3309]# mysqld_safe --defaults-file=/mysql/3308/my.cnf & [root@open_source 3309]# mysqld_safe --defaults-file=/mysql/3309/my.cnf & [root@open_source 3309]# ps -ef|grep mysql |grep -v grep root 10251 7511 0 18:57 pts/1 00:00:00 /bin/sh /usr/local/mysql/bin/mysqld_safe --defaults-file=/mysql/3307/my.cnf mysql 10428 10251 0 18:57 pts/1 00:00:00 /usr/local/mysql/bin/mysqld --defaults-file=/mysql/3307/my.cnf --basedir=/usr/local/mysql --datadir=/mysql/3307/data --plugin-dir=/usr/local/mysql/lib/plugin --user=mysql --log-error=open_source.err --pid-file=open_source.pid --socket=/tmp/mysql3307.sock --port=3307 root 10464 7511 0 18:59 pts/1 00:00:00 /bin/sh /usr/local/mysql/bin/mysqld_safe --defaults-file=/mysql/3308/my.cnf mysql 10641 10464 0 18:59 pts/1 00:00:01 /usr/local/mysql/bin/mysqld --defaults-file=/mysql/3308/my.cnf --basedir=/usr/local/mysql --datadir=/mysql/3308/data --plugin-dir=/usr/local/mysql/lib/plugin --user=mysql --log-error=open_source.err --pid-file=open_source.pid --socket=/tmp/mysql3308.sock --port=3308 root 10672 7511 0 19:00 pts/1 00:00:00 /bin/sh /usr/local/mysql/bin/mysqld_safe --defaults-file=/mysql/3309/my.cnf mysql 10849 10672 0 19:00 pts/1 00:00:01 /usr/local/mysql/bin/mysqld --defaults-file=/mysql/3309/my.cnf --basedir=/usr/local/mysql --datadir=/mysql/3309/data --plugin-dir=/usr/local/mysql/lib/plugin --user=mysql --log-error=open_source.err --pid-file=open_source.pid --socket=/tmp/mysql3309.sock --port=3309 [root@open_source 3309]# netstat -anlt |grep 33 tcp6 0 0 :::3307 :::* LISTEN tcp6 0 0 :::3308 :::* LISTEN tcp6 0 0 :::3309 :::* LISTEN
[root@open_source 3309]# mysql -S /tmp/mysql3307.sock -e "select @@server_id" +-------------+ | @@server_id | +-------------+ | 7 | +-------------+ [root@open_source 3309]# mysql -S /tmp/mysql3308.sock -e "select @@server_id" +-------------+ | @@server_id | +-------------+ | 8 | +-------------+ [root@open_source 3309]# mysql -S /tmp/mysql3309.sock -e "select @@server_id" +-------------+ | @@server_id | +-------------+ | 9 | +-------------+
[root@open_source ~]# mysqladmin -S /tmp/mysql3307.sock shutdown 2020-03-10T00:04:36.491980Z mysqld_safe mysqld from pid file /mysql/3307/data/open_source.pid ended [1] Done mysqld_safe --defaults-file=/mysql/3307/my.cnf (wd: /mysql/3309) (wd now: ~) [root@open_source ~]# mysqladmin -S /tmp/mysql3308.sock shutdown 2020-03-10T00:04:45.304744Z mysqld_safe mysqld from pid file /mysql/3308/data/open_source.pid ended [2]- Done mysqld_safe --defaults-file=/mysql/3308/my.cnf (wd: /mysql/3309) (wd now: ~) [root@open_source ~]# mysqladmin -S /tmp/mysql3309.sock shutdown 2020-03-10T00:04:54.383289Z mysqld_safe mysqld from pid file /mysql/3309/data/open_source.pid ended [3]+ Done mysqld_safe --defaults-file=/mysql/3309/my.cnf (wd: /mysql/3309) (wd now: ~)
關(guān)于如何進(jìn)行MySQL多實(shí)例配置管理就分享到這里了,希望以上內(nèi)容可以對(duì)大家有一定的幫助,可以學(xué)到更多知識(shí)。如果覺(jué)得文章不錯(cuò),可以把它分享出去讓更多的人看到。
網(wǎng)站欄目:如何進(jìn)行MySQL多實(shí)例配置管理-創(chuàng)新互聯(lián)
網(wǎng)頁(yè)路徑:http://aaarwkj.com/article36/dgdesg.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供虛擬主機(jī)、定制開(kāi)發(fā)、Google、營(yíng)銷型網(wǎng)站建設(shè)、建站公司、服務(wù)器托管
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)
猜你還喜歡下面的內(nèi)容