centos8部署MySQL5.7故障集
問題一:日誌檔案不存在,MySQL無法啟動
錯誤日誌:
[root@confluence packages]# /etc/init.d/mysqld restart ERROR! MySQL server PID file could not be found! Starting MySQL.2022-01-15T03:58:44.753030Z mysqld_safe error: log-error set to '/var/log/mariadb/mariadb_error.log', however file don't exists. Create writable for user 'mysql'. ERROR! The server quit without updating PID file (/home/confluence/mysql/mysql_data/confluence.pid). 1.2.3.4.
原因和解決方法:
根據日誌提示,MySQL無法啟動是因為指定的日誌檔案/var/log/mariadb/mariadb_error.log不存在
touch建立/var/log/mariadb/mariadb_error.log,並修改許可權為mysql:mysql,該錯誤解決。
問題二:/etc/my.cnf檔案為空,MySQL無法啟動
錯誤日誌:
[root@confluence packages]# /etc/init.d/mysqld start Starting MySQL.. ERROR! The server quit without updating PID file (/home/confluence/mysql/mysql_data/confluence.pid). [root@confluence packages]#
1.2.3.
原因和解決方法:
原因是/etc/my.cnf檔案是空的,什麼配置都沒有。
檢視/etc/my.cnf,檔案沒有配置資料目錄等資訊,檔案內容如下:
[root@confluence mysql]# cat /etc/my.cnf # # This group is read both both by the client and the server # use it for options that affect everything # [client-server] # # include all files from the config directory # !includedir /etc/my.cnf.d
[root@confluence mysql]# 1.2.3.4.5.6.7.8.9.10.11.12.13. /etc/my.cnf.d目錄下只存在client.cnf一個檔案,內容也是空的: [root@confluence mysql]# cat /etc/my.cnf.d/client.cnf # # These two groups are read by the client library # Use it for options that affect all clients, but not the server # [client] # This group is not read by mysql client library, # If you use the same .cnf file for MySQL and MariaDB, # use it for MariaDB-only client options [client-mariadb]
[root@confluence mysql]# 1.2.3.4.5.6.7.8.9.10.11.12.
把/etc/my.cnf檔案補充完整,問題即解決。
問題三:/etc/my.cnf檔案許可權過大導致MySQL無法啟動
錯誤日誌:
[root@confluence etc]# /etc/init.d/mysqld start my_print_defaults: [Warning] World-writable config file '/etc/my.cnf' is ignored. Starting MySQL.my_print_defaults: [Warning] World-writable config file '/etc/my.cnf' is ignored. my_print_defaults: [Warning] World-writable config file '/etc/my.cnf' is ignored. .. ERROR! The server quit without updating PID file (/home/confluence/mysql/mysql_data/confluence.pid). [root@confluence etc]#
原因和解決方法:
原因是因為/etc/my.cnf檔案是從其它節點複製複製過來的,上傳後預設的許可權過大。把/etc/my.cnf檔案的許可權改成644,重新啟動MySQL則成功。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/69901823/viewspace-2856447/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Centos8 stream系統編譯安裝MySQL5.7教程。CentOS編譯MySql
- Centos8 部署 ElasticSearch 叢集並搭建 ELK,基於Logstash同步MySQL資料到ElasticSearchCentOSElasticsearchMySql
- 在centos8使用Docker部署Django專案CentOSDockerDjango
- CentOS8部署zerotier異地組網CentOS
- Centos7.5基於MySQL5.7的 InnoDB Cluster 多節點高可用叢集環境部署記錄CentOSMySql
- 資料庫Mysql5.7 MGR叢集的搭建資料庫MySql
- Mysql MHA部署-05故障轉移MySql
- 部署分片叢集
- WebSphere 叢集建立及故障排除Web
- Centos8部署jdk、mysql8、tomcat,並部署專案到tomcat中CentOSJDKMySqlTomcat
- linux出現故障字符集亂碼故障排查思路Linux
- 離線版centos8環境部署遷移監控操作筆記CentOS筆記
- docker部署mysql叢集DockerMySql
- Docker部署ElasticSearch叢集DockerElasticsearch
- 【Redis】Redis Cluster-叢集故障轉移Redis
- redis cluster 叢集故障恢復操作思路Redis
- Oracle 12c叢集啟動故障Oracle
- Redis 4.0叢集環境部署Redis
- 如何部署hadoop叢集Hadoop
- Redis Cluster叢集模式部署Redis模式
- 伺服器叢集的故障轉移方案伺服器
- mongodb叢集節點故障的切換方法MongoDB
- linux叢集故障判斷兩則(一)Linux
- linux叢集故障判斷兩則(二)Linux
- 如何在 RHEL8 /CentOS8 上建立多節點 Elastic stack 叢集CentOSAST
- MySQL MHA部署 Part 6 MHA故障轉移測試MySql
- MySQL——MHA高可用群集部署及故障測試MySql
- MySQL高可用群集MHA部署及故障測試分析MySql
- CentOS部署ElasticSearch7.6.1叢集CentOSElasticsearch
- 使用docker部署hadoop叢集DockerHadoop
- 二、Linux部署RabbitMQ叢集LinuxMQ
- Windows Server上部署IoTdb 叢集WindowsServer
- Docker叢集輕鬆部署ApacheStormDockerApacheORM
- MySQL5.7叢集(MGR)啟動報ERROR 3092 (HY000)MySqlError
- centos8 Iptables配置CentOS
- CentOS8換源CentOS
- 記一次Kafka叢集的故障恢復Kafka
- ceph 叢集報 mds cluster is degraded 故障排查薦