【Error】service mysql start [fail]
阿新 • • 發佈:2019-01-01
docker中再次啟動mysql,service mysql start時等待了一會兒就fail了。
檢視log
cat /var/log/mysql/error.log
2018-11-19T02:44:39.824983Z mysqld_safe Logging to '/var/log/mysql/error.log'. 2018-11-19T02:44:39.844196Z mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql 2018-11-19T02:44:40.006453Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 2018-11-19T02:44:40.007481Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.24-0ubuntu0.16.04.1) starting as process 6132 ... 2018-11-19T02:44:40.010825Z 0 [Note] InnoDB: PUNCH HOLE support available 2018-11-19T02:44:40.010867Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins 2018-11-19T02:44:40.010894Z 0 [Note] InnoDB: Uses event mutexes 2018-11-19T02:44:40.010920Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier 2018-11-19T02:44:40.010947Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.8 2018-11-19T02:44:40.010973Z 0 [Note] InnoDB: Using Linux native AIO 2018-11-19T02:44:40.011149Z 0 [Note] InnoDB: Number of pools: 1 2018-11-19T02:44:40.011247Z 0 [Note] InnoDB: Using CPU crc32 instructions 2018-11-19T02:44:40.012135Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M 2018-11-19T02:44:40.018879Z 0 [Note] InnoDB: Completed initialization of buffer pool 2018-11-19T02:44:40.020348Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority(). 2018-11-19T02:44:40.032375Z 0 [Note] InnoDB: Highest supported file format is Barracuda. 2018-11-19T02:44:40.042045Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables 2018-11-19T02:44:40.042169Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ... 2018-11-19T02:44:40.058075Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB. 2018-11-19T02:44:40.059171Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active. 2018-11-19T02:44:40.059210Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active. 2018-11-19T02:44:40.059999Z 0 [Note] InnoDB: 5.7.24 started; log sequence number 2592315 2018-11-19T02:44:40.060281Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool 2018-11-19T02:44:40.060936Z 0 [Note] Plugin 'FEDERATED' is disabled. 2018-11-19T02:44:40.062215Z 0 [Note] InnoDB: Buffer pool(s) load completed at 181119 2:44:40 2018-11-19T02:44:40.064309Z 0 [Warning] Failed to set up SSL because of the following SSL library error: SSL context is not usable without certificate and private key 2018-11-19T02:44:40.064354Z 0 [Note] Server hostname (bind-address): '127.0.0.1'; port: 3306 2018-11-19T02:44:40.064388Z 0 [Note] - '127.0.0.1' resolves to '127.0.0.1'; 2018-11-19T02:44:40.064429Z 0 [Note] Server socket created on IP: '127.0.0.1'. 2018-11-19T02:44:40.068135Z 0 [ERROR] Fatal error: Can't open and lock privilege tables: Table storage engine for 'columns_priv' doesn't have this option 2018-11-19T02:44:40.068173Z 0 [ERROR] Fatal: can't initialize grant subsystem - 'Table storage engine for 'columns_priv' doesn't have this option' 2018-11-19T02:44:40.068210Z 0 [ERROR] Fatal error: Failed to initialize ACL/grant/time zones structures or failed to remove temporary table files. 2018-11-19T02:44:40.068295Z 0 [ERROR] Aborting 2018-11-19T02:44:40.068387Z 0 [Note] Binlog end 2018-11-19T02:44:40.068480Z 0 [Note] Shutting down plugin 'ngram' 2018-11-19T02:44:40.068519Z 0 [Note] Shutting down plugin 'partition' 2018-11-19T02:44:40.068548Z 0 [Note] Shutting down plugin 'BLACKHOLE' 2018-11-19T02:44:40.068577Z 0 [Note] Shutting down plugin 'ARCHIVE' 2018-11-19T02:44:40.068605Z 0 [Note] Shutting down plugin 'MyISAM' 2018-11-19T02:44:40.068635Z 0 [Note] Shutting down plugin 'INNODB_SYS_VIRTUAL' 2018-11-19T02:44:40.068664Z 0 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES' 2018-11-19T02:44:40.068692Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES' 2018-11-19T02:44:40.068720Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS' 2018-11-19T02:44:40.068748Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN' 2018-11-19T02:44:40.068776Z 0 [Note] Shutting down plugin 'INNODB_SYS_FIELDS' 2018-11-19T02:44:40.068804Z 0 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS' 2018-11-19T02:44:40.068832Z 0 [Note] Shutting down plugin 'INNODB_SYS_INDEXES' 2018-11-19T02:44:40.068860Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS' 2018-11-19T02:44:40.068888Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLES' 2018-11-19T02:44:40.068916Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE' 2018-11-19T02:44:40.068944Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE' 2018-11-19T02:44:40.068972Z 0 [Note] Shutting down plugin 'INNODB_FT_CONFIG' 2018-11-19T02:44:40.069000Z 0 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED' 2018-11-19T02:44:40.069028Z 0 [Note] Shutting down plugin 'INNODB_FT_DELETED' 2018-11-19T02:44:40.069056Z 0 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD' 2018-11-19T02:44:40.069084Z 0 [Note] Shutting down plugin 'INNODB_METRICS' 2018-11-19T02:44:40.069112Z 0 [Note] Shutting down plugin 'INNODB_TEMP_TABLE_INFO' 2018-11-19T02:44:40.069140Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS' 2018-11-19T02:44:40.069168Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU' 2018-11-19T02:44:40.069196Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE' 2018-11-19T02:44:40.069224Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET' 2018-11-19T02:44:40.069252Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX' 2018-11-19T02:44:40.069280Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET' 2018-11-19T02:44:40.069308Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM' 2018-11-19T02:44:40.069336Z 0 [Note] Shutting down plugin 'INNODB_CMP_RESET' 2018-11-19T02:44:40.069364Z 0 [Note] Shutting down plugin 'INNODB_CMP' 2018-11-19T02:44:40.069392Z 0 [Note] Shutting down plugin 'INNODB_LOCK_WAITS' 2018-11-19T02:44:40.069420Z 0 [Note] Shutting down plugin 'INNODB_LOCKS' 2018-11-19T02:44:40.069448Z 0 [Note] Shutting down plugin 'INNODB_TRX' 2018-11-19T02:44:40.069476Z 0 [Note] Shutting down plugin 'InnoDB' 2018-11-19T02:44:40.069611Z 0 [Note] InnoDB: FTS optimize thread exiting. 2018-11-19T02:44:40.069904Z 0 [Note] InnoDB: Starting shutdown... 2018-11-19T02:44:40.171073Z 0 [Note] InnoDB: Dumping buffer pool(s) to /var/lib/mysql/ib_buffer_pool 2018-11-19T02:44:40.171699Z 0 [Note] InnoDB: Buffer pool(s) dump completed at 181119 2:44:40 2018-11-19T02:44:41.702244Z 0 [Note] InnoDB: Shutdown completed; log sequence number 2592334 2018-11-19T02:44:41.705094Z 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1" 2018-11-19T02:44:41.705166Z 0 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA' 2018-11-19T02:44:41.705277Z 0 [Note] Shutting down plugin 'CSV' 2018-11-19T02:44:41.705313Z 0 [Note] Shutting down plugin 'MRG_MYISAM' 2018-11-19T02:44:41.705348Z 0 [Note] Shutting down plugin 'MEMORY' 2018-11-19T02:44:41.705382Z 0 [Note] Shutting down plugin 'sha256_password' 2018-11-19T02:44:41.705415Z 0 [Note] Shutting down plugin 'mysql_native_password' 2018-11-19T02:44:41.705553Z 0 [Note] Shutting down plugin 'binlog' 2018-11-19T02:44:41.705976Z 0 [Note] /usr/sbin/mysqld: Shutdown complete 2018-11-19T02:44:41.805660Z mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
解決方案
chown -R mysql:mysql /var/lib/mysql /var/run/mysqld && service mysql start