就在剛剛,MySQL服務器意外掉電關機-設備啟動后,無硬件報錯,無法啟動多實例
永定網(wǎng)站建設公司創(chuàng)新互聯(lián)公司,永定網(wǎng)站設計制作,有大型網(wǎng)站制作公司豐富經(jīng)驗。已為永定上千提供企業(yè)網(wǎng)站建設服務。企業(yè)網(wǎng)站搭建\成都外貿(mào)網(wǎng)站制作要多少錢,請找那個售后服務好的永定做網(wǎng)站的公司定做![root@db02 ~]# mysql -uroot -S /data/3306/mysql.sock ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/data/3306/mysql.sock' (111) ##無法連接到本地mysql socket ##查看日志:沒有記錄error
嘗試啟動mysql 服務,失敗然后想起mysql啟動原理,就是通過mysql啟動腳本,然后調(diào)用 mysqld_safe 腳本,最后調(diào)用mysqld主進程,啟動mysql服務,生成socket文件,所以我去根目錄查看,發(fā)現(xiàn)服務沒有啟動 但有個socket文件
修復mysql
[root@db02 3306]# ls /data/3306/data mysql mysql-bin.000002 mysql-bin.index mysql_oldboy3306.errmy.cnf mysql-bin.000001 mysql-bin.000003 mysqld.pid mysql.sock ##懷疑是剛才意外關機,msyql服務卡死,造成sock文件沒有移除,所以考慮將sock改名或移動到/tmp [root@db02 3306]# cp /data/3306/mysql.sock{,.bak} #將sock文件移除開啟MySQL服務
[root@db02 3306]# /data/3306/mysql start #開啟mysql服務 Starting MySQL... [root@db02 3306]# ps -ef|grep mysql #啟動正常 root 1363 1 0 13:31 pts/0 00:00:00 /bin/sh /application/mysql/bin/mysqld_safe --defaults-file=/data/3306/my.cnf mysql 2087 1363 3 13:31 pts/0 00:00:00 /application/mysql-5.5.32/bin/mysqld --defaults-file=/data/3306/my.cnf --basedir=/application/mysql --datadir=/data/3306/data --plugin-dir=/application/mysql/lib/plugin --user=mysql --log-error=/data/3306/mysql_oldboy3306.err --open-files-limit=1024 --pid-file=/data/3306/mysqld.pid --socket=/data/3306/mysql.sock --port=3306 root 2106 1273 0 13:31 pts/0 00:00:00 grep --color=auto mysql開啟MySQL多實例
[root@db02 3306]# mysql -uroot -p -S /data/3306/mysql.sock Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 2 Server version: 5.5.32-log Source distribution Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql>到此為止,恢復正常。
另外有需要云服務器可以了解下創(chuàng)新互聯(lián)cdcxhl.cn,海內(nèi)外云服務器15元起步,三天無理由+7*72小時售后在線,公司持有idc許可證,提供“云服務器、裸金屬服務器、高防服務器、香港服務器、美國服務器、虛擬主機、免備案服務器”等云主機租用服務以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡單易用、服務可用性高、性價比高”等特點與優(yōu)勢,專為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應用場景需求。
網(wǎng)站名稱:MySQL服務器意外關機-無法啟動多實例-創(chuàng)新互聯(lián)
當前網(wǎng)址:http://www.muchs.cn/article44/dssehe.html
成都網(wǎng)站建設公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站營銷、動態(tài)網(wǎng)站、網(wǎng)站改版、網(wǎng)站排名、企業(yè)建站、網(wǎng)站策劃
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉載內(nèi)容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉載,或轉載時需注明來源: 創(chuàng)新互聯(lián)
猜你還喜歡下面的內(nèi)容