欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

MySQL啟動報錯:Starting MySQL.. ERROR! The server quit without updating PID file的問題分析和解決

 更新時間:2023年12月07日 11:30:23   作者:清風的BLOG  
這篇文章給大家介紹了MySQL啟動報錯:Starting MySQL.. ERROR! The server quit without updating PID file的問題分析和解決辦法,文中給出了詳細的原因分析,需要的朋友可以參考下

問題

[root@centos74 ~]# service mysqld start
Starting MySQL.. ERROR! The server quit without updating PID file (/usr/local/mysql/data/mysqld.pid).

分析解決

1、 可能已經存在 mysqld 進程.

[root@centos74 ~]# ps -ef | grep mysqld
 
[root@centos74 ~]# pkill -9 mysqld
 
# 查看是否有這個進程,如果有殺死掉

2、數(shù)據(jù)目錄mysql用戶是否有權限.

[root@centos74 ~]# chown -R mysql.mysql /usr/local/mysql/data

3、機器上面還有上次安裝mysql的殘留.

[root@centos74 ~]# find / -name mysql-binlog*
 
# 查看mysql的二進制目錄,看是否存在mysqlbinlog.index,有的話刪掉

4、mysql 在啟動的時候會去尋找默認的 配置文件 /etc/my.cnf  這個目錄下的 datadir 要指定數(shù)據(jù)目錄.

 
# 如果沒有,那么在 my.cnf 里面添加 datadir=/usr/local/mysql/data  

5、skip-federated字段問題.

# 檢查一下/etc/my.cnf文件中有沒有沒被注釋掉的skip-federated字段,如果有就立即注釋掉.

6、錯誤日志目錄不存在.

# 賦予 mysql 所有者權限 chmod  chown .

7、防火墻原因.

# centos 會默認開啟selinux .
 
[root@centos74 ~]# vim /etc/selinux/config
SELINUX=disabled

8、查看配置文件/usr/local/mysql/my.cnf里有沒有innodb_buffer_pool_size

# innodb_buffer_pool_size:主要作用是緩存innodb表的索引,數(shù)據(jù),插入數(shù)據(jù)時的緩沖.
 
# 默認值:128M;
 
# 專用mysql服務器設置此值的大?。?系統(tǒng)內存的70%-80%最佳.
 
# 如果你的系統(tǒng)內存不大,查看這個參數(shù),把它的值設置小一點.

10、關注 mysql 的報錯日志.

[root@centos74 /]# cd /usr/local/mysql/
[root@centos74 mysql]# cat mysql.err 
 
190718  8:31:56 [Note] Plugin 'FEDERATED' is disabled.
mysqld: Table 'mysql.plugin' doesn't exist
190718  8:31:56 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
190718  8:31:56 InnoDB: The InnoDB memory heap is disabled
190718  8:31:56 InnoDB: Mutexes and rw_locks use GCC atomic builtins
190718  8:31:56 InnoDB: Compressed tables use zlib 1.2.11
190718  8:31:56 InnoDB: Using Linux native AIO
190718  8:31:56 InnoDB: Initializing buffer pool, size = 128.0M
190718  8:31:56 InnoDB: Completed initialization of buffer pool
InnoDB: The first specified data file ./ibdata1 did not exist:
InnoDB: a new database to be created!
190718  8:31:56  InnoDB: Setting file ./ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
190718  8:31:56  InnoDB: Log file ./ib_logfile0 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile0 size to 5 MB
InnoDB: Database physically writes the file full: wait...
190718  8:31:56  InnoDB: Log file ./ib_logfile1 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile1 size to 5 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Doublewrite buffer not found: creating new
InnoDB: Doublewrite buffer created
InnoDB: 127 rollback segment(s) active.
InnoDB: Creating foreign key constraint system tables
InnoDB: Foreign key constraint system tables created
190718  8:31:56  InnoDB: Waiting for the background threads to start
190718  8:31:57 InnoDB: 5.5.62 started; log sequence number 0
190718  8:31:57 [ERROR] mysqld: unknown option '--initialize'
190718  8:31:57 [ERROR] Aborting
 
190718  8:31:57  InnoDB: Starting shutdown...
190718  8:31:58  InnoDB: Shutdown completed; log sequence number 1595675
190718  8:31:58 [Note] mysqld: Shutdown complete
 
190718  8:32:07 [Note] Plugin 'FEDERATED' is disabled.
/usr/local/mysql/bin/mysqld: Table 'mysql.plugin' doesn't exist
190718  8:32:07 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
190718  8:32:07 InnoDB: The InnoDB memory heap is disabled
190718  8:32:07 InnoDB: Mutexes and rw_locks use GCC atomic builtins
190718  8:32:07 InnoDB: Compressed tables use zlib 1.2.11
190718  8:32:07 InnoDB: Using Linux native AIO
190718  8:32:07 InnoDB: Initializing buffer pool, size = 128.0M
190718  8:32:07 InnoDB: Completed initialization of buffer pool
190718  8:32:07 InnoDB: highest supported file format is Barracuda.
190718  8:32:07  InnoDB: Waiting for the background threads to start
190718  8:32:08 InnoDB: 5.5.62 started; log sequence number 1595675
190718  8:32:08 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
190718  8:32:08 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
190718  8:32:08 [Note] Server socket created on IP: '0.0.0.0'.
190718  8:32:08 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
190718  8:33:17 [Note] Plugin 'FEDERATED' is disabled.
/usr/local/mysql/bin/mysqld: Table 'mysql.plugin' doesn't exist
190718  8:33:17 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
190718  8:33:17 InnoDB: The InnoDB memory heap is disabled
190718  8:33:17 InnoDB: Mutexes and rw_locks use GCC atomic builtins
190718  8:33:17 InnoDB: Compressed tables use zlib 1.2.11
190718  8:33:17 InnoDB: Using Linux native AIO
190718  8:33:17 InnoDB: Initializing buffer pool, size = 128.0M
190718  8:33:17 InnoDB: Completed initialization of buffer pool
190718  8:33:17 InnoDB: highest supported file format is Barracuda.
190718  8:33:17  InnoDB: Waiting for the background threads to start
190718  8:33:18 InnoDB: 5.5.62 started; log sequence number 1595675
190718  8:33:18 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
190718  8:33:18 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
190718  8:33:18 [Note] Server socket created on IP: '0.0.0.0'.
190718  8:33:18 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
190718  8:36:58 [Note] Plugin 'FEDERATED' is disabled.
/usr/local/mysql/bin/mysqld: Table 'mysql.plugin' doesn't exist
190718  8:36:58 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
190718  8:36:58 InnoDB: The InnoDB memory heap is disabled
190718  8:36:58 InnoDB: Mutexes and rw_locks use GCC atomic builtins
190718  8:36:58 InnoDB: Compressed tables use zlib 1.2.11
190718  8:36:58 InnoDB: Using Linux native AIO
190718  8:36:58 InnoDB: Initializing buffer pool, size = 128.0M
190718  8:36:58 InnoDB: Completed initialization of buffer pool
190718  8:36:58 InnoDB: highest supported file format is Barracuda.
190718  8:36:58  InnoDB: Waiting for the background threads to start
190718  8:36:59 InnoDB: 5.5.62 started; log sequence number 1595675
190718  8:36:59 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
190718  8:36:59 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
190718  8:36:59 [Note] Server socket created on IP: '0.0.0.0'.
190718  8:36:59 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist

以上就是MySQL啟動報錯:Starting MySQL.. ERROR! The server quit without updating PID file的問題分析和解決的詳細內容,更多關于MySQL啟動報錯:Starting MySQL.. ERROR的資料請關注腳本之家其它相關文章!

相關文章

  • 淺談Mysql8和mysql5.7的區(qū)別

    淺談Mysql8和mysql5.7的區(qū)別

    本文主要介紹了Mysql8和mysql5.7的區(qū)別,文中通過示例代碼介紹的非常詳細,具有一定的參考價值,感興趣的小伙伴們可以參考一下
    2022-03-03
  • 詳解mysql權限和索引

    詳解mysql權限和索引

    本篇文章給大家詳細分析了mysql的權限和索引相關知識要點,有這方面需要的朋友參考學習下。
    2018-01-01
  • ubuntu下apt-get安裝和徹底卸載mysql詳解

    ubuntu下apt-get安裝和徹底卸載mysql詳解

    本文給大家分享ubuntu下apt-get安裝和徹底卸載mysql的方法,文中提到了安裝mysq命令查看mysql是否運行的命令寫法,具體內容詳情大家通過本文學習吧
    2017-08-08
  • MySQL禁用InnoDB引擎的方法

    MySQL禁用InnoDB引擎的方法

    這篇文章主要介紹了MySQL禁用InnoDB引擎的方法,針對的Mysql版本是5.5和5.6,使用了兩種不同的配置文件,需要的朋友可以參考下
    2014-05-05
  • 一篇文章帶你了解清楚Mysql?鎖

    一篇文章帶你了解清楚Mysql?鎖

    這篇文章主要介紹了一篇文章帶你了解清楚Mysql?鎖的相關資料,需要的朋友可以參考下
    2022-11-11
  • 一看就懂的MySQL的聚簇索引及聚簇索引是如何長高的

    一看就懂的MySQL的聚簇索引及聚簇索引是如何長高的

    聚簇索引不是一種單獨的索引類型,而是一種數(shù)據(jù)存儲方式。innodb的聚簇索引實際上在同一個結構中保存了B-tree索引和數(shù)據(jù)行。通過本文學習MySQL的聚簇索引及聚簇索引是如何長高的,感興趣的朋友一起學習下吧
    2021-05-05
  • MYSQL索引建立需要注意以下幾點細節(jié)

    MYSQL索引建立需要注意以下幾點細節(jié)

    建立MYSQL索引時需要注意以下幾點:建立索引的時機/對于like/對于有多個條件的/開啟索引緩存/建立索引是有代價的等等,感興趣的你可以參考下本文,或許可以幫助到你
    2013-03-03
  • MySQL DATE_ADD和ADDDATE函數(shù)實現(xiàn)向日期添加指定時間間隔

    MySQL DATE_ADD和ADDDATE函數(shù)實現(xiàn)向日期添加指定時間間隔

    這篇文章主要介紹了MySQL DATE_ADD和ADDDATE函數(shù)實現(xiàn)向日期添加指定時間間隔,文中通過示例代碼介紹的非常詳細,對大家的學習或者工作具有一定的參考學習價值,需要的朋友們下面隨著小編來一起學習學習吧
    2021-01-01
  • union和子查詢中order?by一起使用導致排序失效問題及解決

    union和子查詢中order?by一起使用導致排序失效問題及解決

    這篇文章主要介紹了union和子查詢中order?by一起使用導致排序失效問題及解決方案,具有很好的參考價值,希望對大家有所幫助。如有錯誤或未考慮完全的地方,望不吝賜教
    2022-12-12
  • linux下mysql 5.1 和 5.7的安裝教程

    linux下mysql 5.1 和 5.7的安裝教程

    下面小編就為大家分享一篇linux下mysql 5.1 和 5.7的安裝教程,具有很好的參考價值,希望對大家有所幫助。一起跟隨小編過來看看吧
    2017-12-12

最新評論