国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 數(shù)據(jù)庫 > MySQL > 正文

MySQL開啟失敗

2024-07-24 12:34:55
字體:
供稿:網(wǎng)友
        MySQL啟動(dòng)失敗:

  一、錯(cuò)誤日志:
  [mysql@host-172-24-115-217 ~]$ service mysql restart
  Shutting down MySQL.. SUCCESS!
  Starting MySQL..180426 13:36:03 mysqld_safe Logging to '/usr/local/mysql/data/alert.log'.
  180426 13:36:03 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data

  二、分析日志:
  (1)查看日志
  usr/local/mysql/data/alert.log
  發(fā)現(xiàn):Version: '5.5.59-MariaDB'  socket: '/usr/local/mysql/data/mysql.sock'  port: 3306  MariaDB Server
  表示mysqld 啟動(dòng)完畢。
 
  (2)查看進(jìn)程
  [mysql@host-172-24-115-217 fd]$ ps -ef | grep mysqld
  mysql    20633     1  0 13:36 pts/5    00:00:00 /bin/sh /usr/local/mysql/bin/mysqld_safe --datadir=/usr/local/mysql/data --pid-file=/usr/local/mysql/data/mysqlProcess.pid
  mysql    21736 20633  0 13:36 pts/5    00:00:02 /usr/local/mysql/bin/mysqld --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --plugin-dir=/usr/local/mysql/lib/plugin --log-error=/usr/local/mysql/data/alert.log --pid-file=/usr/local/mysql/data/mysqlProcess.pid --socket=/usr/local/mysql/data/mysql.sock --port=3306
  mysql    22436  7333  0 13:40 pts/3    00:00:00 grep mysqld
 
  分析:
  從日志和進(jìn)程信息可以看出此mysqld服務(wù)正常。那為什么出現(xiàn)啟動(dòng)失敗的現(xiàn)象。
 
  三、挖掘原因
  既然mysqld服務(wù)進(jìn)程正常,那從其它機(jī)器是否可以登錄。經(jīng)過測(cè)試
  [mysql@host-172-24-115-218 ~]$ mysql -h272.24.115.217 -uroot -pmysql
  Welcome to the MariaDB monitor.  Commands end with ; or /g.
  Your MariaDB connection id is 1
  Server version: 5.5.59-MariaDB MariaDB Server
 
  Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
 
  Type 'help;' or '/h' for help. Type '/c' to clear the current input statement.
 
  MariaDB [(none)]>
 
  經(jīng)過驗(yàn)證,可以登錄。
 
  四:結(jié)論
  從此可以推斷
  mysql服務(wù)器的client配置錯(cuò)誤,導(dǎo)致mysql進(jìn)程讀取配置導(dǎo)致異常
 
  檢查/etc/my.cnf 發(fā)現(xiàn)如下:
  [client]
  #socket = /usr/local/mysql/data/mysql.sock
  default-character-set = gbk
  port = 3306
 
  缺少紅色部分,注釋后,再次重啟一切正常。
 
  希望改進(jìn):
  希望mysql的啟動(dòng)過程相關(guān)的shell腳本也能添加相應(yīng)的日志,協(xié)助分析問題。
 
  That is all.
  Good Luck!
 

(編輯:武林網(wǎng))

發(fā)表評(píng)論 共有條評(píng)論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 唐山市| 望奎县| 古交市| 咸阳市| 招远市| 黑水县| 昌平区| 林口县| 宿州市| 红河县| 渑池县| 社会| 禄丰县| 新沂市| 乌鲁木齐市| 津南区| 德庆县| 思茅市| 五台县| 崇礼县| 金山区| 萨嘎县| 涟源市| 特克斯县| 九寨沟县| 鹤岗市| 二连浩特市| 周口市| 宜章县| 凭祥市| 将乐县| 双柏县| 南汇区| 广水市| 石家庄市| 兰溪市| 桐乡市| 喀喇沁旗| 孝感市| 偃师市| 上犹县|