国产成人精品久久免费动漫-国产成人精品天堂-国产成人精品区在线观看-国产成人精品日本-a级毛片无码免费真人-a级毛片毛片免费观看久潮喷

您的位置:首頁技術(shù)文章
文章詳情頁

導致mysqld無法啟動的一個錯誤問題及解決

瀏覽:130日期:2023-02-18 16:43:46
目錄
  • 導致mysqld無法啟動的一個錯誤
  • mysql 啟動報錯問題
  • 總結(jié)

導致mysqld無法啟動的一個錯誤

由于不小心刪除了 /var/log/mysql/ 這個目錄(這是mysql服務器用來保存log的地方),導致無法啟動mysqld。

在終端輸入 service mysql start 回車,輸出:

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

于是在終端輸入 mysqld 回車,輸出:

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

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

mysql 啟動報錯問題

MySQL 啟動時報錯

[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 后啟動正常

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

分析其原因:

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

總結(jié)

以上為個人經(jīng)驗,希望能給大家一個參考,也希望大家多多支持。

標簽: MySQL
主站蜘蛛池模板: 亚洲精品国产一区二区 | 成年女人免费毛片视频永久 | 国产美女91视频 | 亚洲精品一 | 亚洲六月丁香六月婷婷蜜芽 | 大胆gogo999亚洲肉体艺术 | 综合久久久久久中文字幕 | 日本亚洲视频 | 国产成人综合久久精品亚洲 | 在线免费观看毛片网站 | 黄网站在线播放视频免费观看 | a级国产乱理伦片在线观看 a级国产乱理伦片在线观看99 | 最新国产精品视频免费看 | 99r8这是只有精品视频9 | 国产欧美一区二区精品性色 | 男人把女人桶到喷白浆的视频 | 好湿好紧好痛a级是免费视频 | 男人看片网址 | 理论片我不卡在线观看 | 波多野结衣在线观看免费区 | 嫩模大尺度人体福利视频 | 免费人成观看在线网 | 国产成人福利免费观看 | aaa在线| 久青草青综合在线视频 | 国产亚洲亚洲精品777 | 69性欧美高清影院 | 亚洲第一页在线播放 | 一区二区三区视频免费 | 欧美日韩精品一区二区三区视频播放 | 久久思 | 精品一区二区三区在线视频 | 网站国产 | 国产精品19禁在线观看2021 | 久久久久性 | 男女视频免费在线观看 | 国产精品国产亚洲精品看不卡 | 最新中文字幕乱码在线 | 国产视频自拍一区 | 日本一区二区三区高清福利视频 | 日本美女高清在线观看免费 |