亚洲视频二区_亚洲欧洲日本天天堂在线观看_日韩一区二区在线观看_中文字幕不卡一区

公告:魔扣目錄網為廣大站長提供免費收錄網站服務,提交前請做好本站友鏈:【 網站目錄:http://www.430618.com 】, 免友鏈快審服務(50元/站),

點擊這里在線咨詢客服
新站提交
  • 網站:51998
  • 待審:31
  • 小程序:12
  • 文章:1030137
  • 會員:747

在centos8系統上安裝MySQL,使用的是centos7上安裝MySQL的腳本,出現了以下問題,以做記錄:

問題一:日志文件不存在,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則成功。

 

原文來自:https://blog.51cto.com/u_10950710/4977853
本文地址:https://www.linuxprobe.com/centos-mysql-yy.html編輯:王華超,審核員:逄增寶
Linux命令大全:https://www.linuxcool.com/
Linux系統大全:https://www.linuxdown.com/
紅帽認證RHCE考試心得:https://www.rhce.NET/

分享到:
標簽:MySQL
用戶無頭像

網友整理

注冊時間:

網站:5 個   小程序:0 個  文章:12 篇

  • 51998

    網站

  • 12

    小程序

  • 1030137

    文章

  • 747

    會員

趕快注冊賬號,推廣您的網站吧!
最新入駐小程序

數獨大挑戰2018-06-03

數獨一種數學游戲,玩家需要根據9

答題星2018-06-03

您可以通過答題星輕松地創建試卷

全階人生考試2018-06-03

各種考試題,題庫,初中,高中,大學四六

運動步數有氧達人2018-06-03

記錄運動步數,積累氧氣值。還可偷

每日養生app2018-06-03

每日養生,天天健康

體育訓練成績評定2018-06-03

通用課目體育訓練成績評定