The server quit without updating PID file (/mydata/mysql/BIDB.pid).[FAILED]

urgel_babay發表於2016-02-29
剛剛安裝的MySQL 啟動時報錯:
[root@BIDB scripts]# ../support-files/mysql.server start
Starting MySQL........The server quit without updating PID file (/mydata/mysql/BIDB.pid).[FAILED]
[root@BIDB scripts]# vi /etc/my.cnf

檢視日誌:

點選(此處)摺疊或開啟

  1. 140928 12:46:21 mysqld_safe mysqld from pid file /mydata/mysql/BIDB.pid ended
  2. 140928 12:48:43 mysqld_safe Starting mysqld daemon with databases from /mydata/mysql
  3. 2014-09-28 12:48:43 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
  4. 2014-09-28 12:48:43 66983 [Note] Plugin \'FEDERATED\' is disabled.
  5. /my/mysql/bin/mysqld: Table \'mysql.plugin\' doesn\'t exist
  6. 2014-09-28 12:48:43 66983 [ERROR] Can\'t open the mysql.plugin table. Please run mysql_upgrade to create it.
  7. 2014-09-28 12:48:43 66983 [Note] InnoDB: Using atomics to ref count buffer pool pages
  8. 2014-09-28 12:48:43 66983 [Note] InnoDB: The InnoDB memory heap is disabled
  9. 2014-09-28 12:48:43 66983 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
  10. 2014-09-28 12:48:43 66983 [Note] InnoDB: Compressed tables use zlib 1.2.3
  11. 2014-09-28 12:48:43 66983 [Note] InnoDB: Using CPU crc32 instructions
  12. 2014-09-28 12:48:43 66983 [Note] InnoDB: Initializing buffer pool, size = 100.0G
  13. 2014-09-28 12:48:49 66983 [Note] InnoDB: Completed initialization of buffer pool
  14. 2014-09-28 12:48:50 7ff1edc84720 InnoDB: Operating system error number 13 in a file operation.
  15. InnoDB: The error means mysqld does not have the access rights to
  16. InnoDB: the directory.
  17. 2014-09-28 12:48:50 7ff1edc84720 InnoDB: Operating system error number 13 in a file operation.
  18. InnoDB: The error means mysqld does not have the access rights to
  19. InnoDB: the directory.
  20. 2014-09-28 12:48:50 66983 [ERROR] InnoDB: Creating or opening ./ibdata1 failed!
  21. 2014-09-28 12:48:50 66983 [ERROR] InnoDB: Could not open or create the system tablespace. If you tried to add new data files to the system tablespace, and it failed here, you should now edit innodb_data_file_path in my.cnf back to what it was, and remove the new ibdata files InnoDB created in this failed attempt. InnoDB only wrote those files full of zeros, but did not yet use them in any way. But be careful: do not remove old data files which contain your precious data!
  22. 2014-09-28 12:48:50 66983 [ERROR] Plugin \'InnoDB\' init function returned error.
  23. 2014-09-28 12:48:50 66983 [ERROR] Plugin \'InnoDB\' registration as a STORAGE ENGINE failed.
  24. 2014-09-28 12:48:50 66983 [ERROR] Unknown/unsupported storage engine: InnoDB
  25. 2014-09-28 12:48:50 66983 [ERROR] Aborting
  26. 2014-09-28 12:48:50 66983 [Note] Binlog end
  27. 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'partition\'
  28. 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'INNODB_SYS_DATAFILES\'
  29. 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'INNODB_SYS_TABLESPACES\'
  30. 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'INNODB_SYS_FOREIGN_COLS\'
  31. 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'INNODB_SYS_FOREIGN\'
  32. 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'INNODB_SYS_FIELDS\'
  33. 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'INNODB_SYS_COLUMNS\'
  34. 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'INNODB_SYS_INDEXES\'
  35. 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'INNODB_SYS_TABLESTATS\'
  36. 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'INNODB_SYS_TABLES\'
  37. 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'INNODB_FT_INDEX_TABLE\'
  38. 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'INNODB_FT_INDEX_CACHE\'
  39. 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'INNODB_FT_CONFIG\'
  40. 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'INNODB_FT_BEING_DELETED\'
  41. 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'INNODB_FT_DELETED\'
  42. 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'INNODB_FT_DEFAULT_STOPWORD\'
  43. 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'INNODB_METRICS\'
  44. 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'INNODB_BUFFER_POOL_STATS\'
  45. 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'INNODB_BUFFER_PAGE_LRU\'
  46. 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'INNODB_BUFFER_PAGE\'
  47. 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'INNODB_CMP_PER_INDEX_RESET\'
  48. 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'INNODB_CMP_PER_INDEX\'
  49. 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'INNODB_CMPMEM_RESET\'
  50. 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'INNODB_CMPMEM\'
  51. 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'INNODB_CMP_RESET\'
  52. 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'INNODB_CMP\'
  53. 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'INNODB_LOCK_WAITS\'
  54. 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'INNODB_LOCKS\'
  55. 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'INNODB_TRX\'
  56. 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'PERFORMANCE_SCHEMA\'
  57. 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'ARCHIVE\'
  58. 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'BLACKHOLE\'
  59. 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'MRG_MYISAM\'
  60. 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'MEMORY\'
  61. 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'CSV\'
  62. 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'MyISAM\'
  63. 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'sha256_password\'
  64. 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'mysql_old_password\'
  65. 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'mysql_native_password\'
  66. 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'binlog\'
  67. 2014-09-28 12:48:50 66983 [Note] /my/mysql/bin/mysqld: Shutdown complete
經常啟動MySQL的時候遇見這個錯誤。也是最常見的錯誤之一
解決辦法:
我也是嘗試了好多次。
1、修改/etc/my.cnf   檔案。要跟實際的一樣
2、到MySQL的安裝目錄下面的script
./mysql_install_db --basedir=/my/mysql --no-defaults --skip-name-resolve --user=mysql --datadir=/mydata/mysql/data
這是重新初始化MySQL。
3. 切換到suppsupport-files 目錄下啟動MySQL
./mysql.server start.

經驗總結:
1、上面的有可4能一次不行,多執行幾次。
2、注意這兩個引數確性:
basedir = /my/mysql                    ----MySQL安裝路徑 
datadir = /mydata/mysql/data       ----MySQL的資料檔案存放位置

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/30936525/viewspace-2016617/,如需轉載,請註明出處,否則將追究法律責任。

相關文章