最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

導(dǎo)致mysqld無(wú)法啟動(dòng)的一個(gè)錯(cuò)誤問(wèn)題及解決

 更新時(shí)間:2023年02月20日 14:04:52   作者:qiuchangyong  
這篇文章主要介紹了導(dǎo)致mysqld無(wú)法啟動(dòng)的一個(gè)錯(cuò)誤問(wèn)題及解決方案,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。如有錯(cuò)誤或未考慮完全的地方,望不吝賜教

導(dǎo)致mysqld無(wú)法啟動(dòng)的一個(gè)錯(cuò)誤

由于不小心刪除了 /var/log/mysql/ 這個(gè)目錄(這是mysql服務(wù)器用來(lái)保存log的地方),導(dǎo)致無(wú)法啟動(dòng)mysqld。

在終端輸入 service mysql start 回車(chē),輸出:

Job for mysql.service failed because the control process exited with error code.
See "systemctl status mysql.service" and "journalctl -xe" for details.

于是在終端輸入 mysqld 回車(chē),輸出:

2020-12-24T06:29:14.144840Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2020-12-24T06:29:14.146597Z 0 [Note] mysqld (mysqld 5.7.31-0ubuntu0.18.04.1) starting as process 2760 ...
2020-12-24T06:29:14.151841Z 0 [ERROR] Could not open file '/var/log/mysql/error.log' for error logging: Permission denied
2020-12-24T06:29:14.151990Z 0 [ERROR] Aborting
 
2020-12-24T06:29:14.152063Z 0 [Note] Binlog end
2020-12-24T06:29:14.152108Z 0 [Note] mysqld: Shutdown complete

從提示看,是無(wú)法創(chuàng)建error.log,于是創(chuàng)建/var/log/mysql,再執(zhí)行 ls -l /var/log 發(fā)現(xiàn)mysql這個(gè)目錄的用戶(hù)權(quán)限和組權(quán)限都是root,這就是問(wèn)題所在,需要將其都改為mysql(使用chmod和chown命令)。

mysql 啟動(dòng)報(bào)錯(cuò)問(wèn)題

MySQL 啟動(dòng)時(shí)報(bào)錯(cuò)

[root@yyfwq2 bin]# service mysql start
Starting MySQL....The server quit without updating PID file (/app/data//mysqldb.pid).[FAILED]

檢查日志

[root@yyfwq2 log]# cat error.log
2017-11-21T11:42:15.698749Z 0 [Note] --secure-file-priv is set to NULL. Operations related to importing and exporting data are disabled
2017-11-21T11:42:15.698941Z 0 [Note] /app/mysql/bin/mysqld (mysqld 5.7.18-log) starting as process 7838 ...
2017-11-21T11:42:15.710334Z 0 [Note] InnoDB: PUNCH HOLE support not available
2017-11-21T11:42:15.710380Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2017-11-21T11:42:15.710389Z 0 [Note] InnoDB: Uses event mutexes
2017-11-21T11:42:15.710397Z 0 [Note] InnoDB: GCC builtin __sync_synchronize() is used for memory barrier
2017-11-21T11:42:15.710404Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3
2017-11-21T11:42:15.710412Z 0 [Note] InnoDB: Using Linux native AIO
2017-11-21T11:42:15.710979Z 0 [Note] InnoDB: Number of pools: 1
2017-11-21T11:42:15.711154Z 0 [Note] InnoDB: Using CPU crc32 instructions
2017-11-21T11:42:15.716819Z 0 [Note] InnoDB: Initializing buffer pool, total size = 10G, instances = 8, chunk size = 128M
2017-11-21T11:42:16.845646Z 0 [Note] InnoDB: Completed initialization of buffer pool
2017-11-21T11:42:16.961424Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2017-11-21T11:42:16.961647Z 0 [ERROR] InnoDB: The Auto-extending innodb_system data file './ibdata1' is of a different size 768 pages (rounded down to MB) than specified in the .cnf file: initial 65536 pages, max 0 (relevant if non-zero) pages!
2017-11-21T11:42:16.961676Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2017-11-21T11:42:17.562477Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
2017-11-21T11:42:17.562498Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2017-11-21T11:42:17.562511Z 0 [ERROR] Failed to initialize plugins.
2017-11-21T11:42:17.562518Z 0 [ERROR] Aborting
 
2017-11-21T11:42:17.562536Z 0 [Note] Binlog end
2017-11-21T11:42:17.562673Z 0 [Note] Shutting down plugin 'CSV'
2017-11-21T11:42:17.563197Z 0 [Note] /app/mysql/bin/mysqld: Shutdown complete
 
2017-11-21T11:46:34.437631Z 0 [Note] --secure-file-priv is set to NULL. Operations related to importing and exporting data are disabled
2017-11-21T11:46:34.437786Z 0 [Note] /app/mysql/bin/mysqld (mysqld 5.7.18-log) starting as process 9427 ...
2017-11-21T11:46:34.446814Z 0 [Note] InnoDB: PUNCH HOLE support not available
2017-11-21T11:46:34.446875Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2017-11-21T11:46:34.446886Z 0 [Note] InnoDB: Uses event mutexes
2017-11-21T11:46:34.446894Z 0 [Note] InnoDB: GCC builtin __sync_synchronize() is used for memory barrier
2017-11-21T11:46:34.446902Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3
2017-11-21T11:46:34.446910Z 0 [Note] InnoDB: Using Linux native AIO
2017-11-21T11:46:34.447429Z 0 [Note] InnoDB: Number of pools: 1
2017-11-21T11:46:34.447594Z 0 [Note] InnoDB: Using CPU crc32 instructions
2017-11-21T11:46:34.451429Z 0 [Note] InnoDB: Initializing buffer pool, total size = 10G, instances = 8, chunk size = 128M
2017-11-21T11:46:35.561606Z 0 [Note] InnoDB: Completed initialization of buffer pool
2017-11-21T11:46:35.666054Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2017-11-21T11:46:35.666901Z 0 [ERROR] InnoDB: The Auto-extending innodb_system data file './ibdata1' is of a different size 768 pages (rounded down to MB) than specified in the .cnf file: initial 65536 pages, max 0 (relevant if non-zero) pages!
2017-11-21T11:46:35.666932Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2017-11-21T11:46:36.267707Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
2017-11-21T11:46:36.267729Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2017-11-21T11:46:36.267742Z 0 [ERROR] Failed to initialize plugins.
2017-11-21T11:46:36.267750Z 0 [ERROR] Aborting
 
2017-11-21T11:46:36.267768Z 0 [Note] Binlog end
2017-11-21T11:46:36.267919Z 0 [Note] Shutting down plugin 'CSV'
2017-11-21T11:46:36.268430Z 0 [Note] /app/mysql/bin/mysqld: Shutdown complete

刪除:ibdata1、ib_logfile0、ib_logfile1 后啟動(dòng)正常

[root@yyfwq2 data]# rm -rf ibdata1 ib_logfile0 ib_logfile1
[root@yyfwq2 data]# service mysql start
Starting MySQL..............................................................................................................[ ?OK ?]

分析其原因:

數(shù)據(jù)在初始化是分配了ibdata1的大小。我在my.cnf中重新設(shè)置了innodb_data_file_path = ibdata1:1G:autoextend  導(dǎo)致啟動(dòng)時(shí)報(bào)錯(cuò)。

總結(jié)

以上為個(gè)人經(jīng)驗(yàn),希望能給大家一個(gè)參考,也希望大家多多支持腳本之家。

相關(guān)文章

  • centos7.2下安裝mysql5.7數(shù)據(jù)庫(kù)的命令詳解

    centos7.2下安裝mysql5.7數(shù)據(jù)庫(kù)的命令詳解

    這篇文章主要介紹了centos7.2下安裝mysql5.7數(shù)據(jù)庫(kù),文中給出了所有的命令,按照命令執(zhí)行就會(huì)安裝上 ,需要的朋友可以參考下
    2019-07-07
  • 阿里云ECS centos6.8下安裝配置MySql5.7的教程

    阿里云ECS centos6.8下安裝配置MySql5.7的教程

    阿里云默認(rèn)yum命令下的MySQL是5.17****,安裝mysql5.7之前先卸載以前的版本。下面通過(guò)本文給大家介紹阿里云ECS centos6.8下安裝配置MySql5.7的教程,需要的的朋友參考下吧
    2017-07-07
  • mysql手動(dòng)刪除BINLOG的方法

    mysql手動(dòng)刪除BINLOG的方法

    用于刪除列于在指定的日志或日期之前的日志索引中的所有二進(jìn)制日志。這些日志也會(huì)從記錄在日志索引文件
    2013-03-03
  • MySQL5.6安裝步驟圖文詳解

    MySQL5.6安裝步驟圖文詳解

    這篇文章主要為大家詳細(xì)介紹了MySQL安裝步驟配置方法圖文,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下
    2017-10-10
  • mysql show操作簡(jiǎn)單示例

    mysql show操作簡(jiǎn)單示例

    這篇文章主要介紹了mysql show操作,結(jié)合簡(jiǎn)單實(shí)例形式總結(jié)分析了mysql使用show語(yǔ)句顯示各種常見(jiàn)信息相關(guān)操作技巧,需要的朋友可以參考下
    2019-04-04
  • MySQL窗口函數(shù)實(shí)現(xiàn)榜單排名

    MySQL窗口函數(shù)實(shí)現(xiàn)榜單排名

    相信大家在日常的開(kāi)發(fā)中經(jīng)常會(huì)碰到榜單類(lèi)的活動(dòng)需求,本文主要介紹了MySQL窗口函數(shù)實(shí)現(xiàn)榜單排名,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧
    2023-04-04
  • mysql?體系結(jié)構(gòu)和存儲(chǔ)引擎介紹

    mysql?體系結(jié)構(gòu)和存儲(chǔ)引擎介紹

    這篇文章主要介紹了mysql?體系結(jié)構(gòu)和存儲(chǔ)引擎,通過(guò)mysql數(shù)據(jù)庫(kù)常見(jiàn)的數(shù)據(jù)庫(kù)引擎展開(kāi)各個(gè)引擎之間的特性和區(qū)別。下文更多相關(guān)資料介紹感興趣的小伙伴可以參考一下
    2022-05-05
  • MySQL SQL語(yǔ)句分析與查詢(xún)優(yōu)化詳解

    MySQL SQL語(yǔ)句分析與查詢(xún)優(yōu)化詳解

    這篇文章主要介紹了MySQL SQL語(yǔ)句分析查詢(xún)優(yōu)化,需要的朋友可以參考下
    2018-03-03
  • MySQL多列IN查詢(xún)的實(shí)現(xiàn)

    MySQL多列IN查詢(xún)的實(shí)現(xiàn)

    多列 IN 查詢(xún)是一種強(qiáng)大的篩選工具,它允許通過(guò)多字段組合快速過(guò)濾數(shù)據(jù),本文主要介紹了MySQL 多列 IN 查詢(xún)的實(shí)現(xiàn),具有一定的參考價(jià)值,感興趣的可以了解一下
    2025-03-03
  • MySQL數(shù)據(jù)庫(kù)之?dāng)?shù)據(jù)表操作

    MySQL數(shù)據(jù)庫(kù)之?dāng)?shù)據(jù)表操作

    這篇文章主要介紹了MySQL數(shù)據(jù)庫(kù)之?dāng)?shù)據(jù)表操作,文章基于MySQL數(shù)據(jù)庫(kù)的相關(guān)資料展開(kāi)詳細(xì)的數(shù)據(jù)表操作的詳情,具有一定的參考價(jià)值,需要的小伙伴可以參考一下
    2022-05-05

最新評(píng)論

分宜县| 宝坻区| 南雄市| 丰台区| 河南省| 汕尾市| 石棉县| 泸定县| 丘北县| 山阴县| 视频| 彰化县| 赣榆县| 浦东新区| 瑞金市| 漠河县| 麦盖提县| 运城市| 称多县| 天峻县| 来宾市| 商丘市| 襄垣县| 邻水| 龙江县| 连云港市| 平安县| 彝良县| 绥阳县| 台州市| 定西市| 濮阳市| 丹凤县| 阜南县| 天柱县| 蚌埠市| 江陵县| 旬邑县| 视频| 泉州市| 竹溪县|