docker mysql无法启动

新手上路,请多包涵

错误日志

2018-11-01T07:51:55.214905Z 0 [Warning] 'ERROR_FOR_DIVISION_BY_ZERO' mode is removed. Setting this will have no effect.
2018-11-01T07:51:55.215499Z 0 [Warning] 'ERROR_FOR_DIVISION_BY_ZERO' mode is removed. Setting this will have no effect.
2018-11-01T07:51:55.215504Z 0 [Warning] 'ERROR_FOR_DIVISION_BY_ZERO' mode is removed. Setting this will have no effect.
2018-11-01T07:51:55.216812Z 0 [Note] mysqld (mysqld 5.7.4-m14-log) starting as process 1 ...
2018-11-01T07:51:55.252846Z 0 [Note] Plugin 'FEDERATED' is disabled.
2018-11-01T07:51:55.270318Z 0 [Note] InnoDB: Using atomics to ref count buffer pool pages
2018-11-01T07:51:55.270353Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2018-11-01T07:51:55.270358Z 0 [Note] InnoDB: Uses event mutexes
2018-11-01T07:51:55.270360Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3
2018-11-01T07:51:55.270362Z 0 [Note] InnoDB: Using Linux native AIO
2018-11-01T07:51:55.274288Z 0 [Note] InnoDB: Number of pools: 1
2018-11-01T07:51:55.274698Z 0 [Note] InnoDB: Using CPU crc32 instructions
2018-11-01T07:51:55.276858Z 0 [Note] InnoDB: Initializing buffer pool, total size = 160.0M, instances = 1
2018-11-01T07:51:55.299342Z 0 [Note] InnoDB: Completed initialization of buffer pool
2018-11-01T07:51:55.346210Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2018-11-01T07:51:55.634882Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2018-11-01T07:51:55.635697Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2018-11-01T07:51:55.717649Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2018-11-01T07:51:55.718844Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
2018-11-01T07:51:55.718856Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
2018-11-01T07:51:55.739986Z 0 [Note] InnoDB: Waiting for purge to start
2018-11-01T07:51:55.790813Z 0 [Note] InnoDB: 5.7.4 started; log sequence number 10749552
2018-11-01T07:51:55.843993Z 0 [Note] Server hostname (bind-address): '*'; port: 3306
2018-11-01T07:51:55.844296Z 0 [Note] IPv6 is available.
2018-11-01T07:51:55.844363Z 0 [Note] - '::' resolves to '::';
2018-11-01T07:51:55.844390Z 0 [Note] Server socket created on IP: '::'.
2018-11-01T07:51:55.844499Z 0 [ERROR] Can't start server : Bind on unix socket: No such file or directory
2018-11-01T07:51:55.844610Z 0 [ERROR] Do you already have another mysqld server running on socket: /var/run/mysqld/mysqld.sock ?
2018-11-01T07:51:55.844745Z 0 [ERROR] Aborting

2018-11-01T07:51:55.844876Z 0 [Note] Binlog end
2018-11-01T07:51:55.845912Z 0 [Note] Shutting down plugin 'partition'
2018-11-01T07:51:55.845979Z 0 [Note] Shutting down plugin 'ARCHIVE'
2018-11-01T07:51:55.845998Z 0 [Note] Shutting down plugin 'BLACKHOLE'
2018-11-01T07:51:55.846012Z 0 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'
2018-11-01T07:51:55.846134Z 0 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'
2018-11-01T07:51:55.846194Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES'
2018-11-01T07:51:55.846213Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'
2018-11-01T07:51:55.846316Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'
2018-11-01T07:51:55.846373Z 0 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'
2018-11-01T07:51:55.846392Z 0 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'
2018-11-01T07:51:55.846494Z 0 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'
2018-11-01T07:51:55.846574Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'
2018-11-01T07:51:55.846687Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLES'
2018-11-01T07:51:55.846771Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'
2018-11-01T07:51:55.846847Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'
2018-11-01T07:51:55.846973Z 0 [Note] Shutting down plugin 'INNODB_FT_CONFIG'
2018-11-01T07:51:55.847049Z 0 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'
2018-11-01T07:51:55.847175Z 0 [Note] Shutting down plugin 'INNODB_FT_DELETED'
2018-11-01T07:51:55.847251Z 0 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'
2018-11-01T07:51:55.847376Z 0 [Note] Shutting down plugin 'INNODB_METRICS'
2018-11-01T07:51:55.847452Z 0 [Note] Shutting down plugin 'INNODB_TEMP_TABLE_INFO'
2018-11-01T07:51:55.847578Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'
2018-11-01T07:51:55.847654Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'
2018-11-01T07:51:55.847780Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'
2018-11-01T07:51:55.847857Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET'
2018-11-01T07:51:55.847982Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX'
2018-11-01T07:51:55.848058Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'
2018-11-01T07:51:55.848185Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM'
2018-11-01T07:51:55.848260Z 0 [Note] Shutting down plugin 'INNODB_CMP_RESET'
2018-11-01T07:51:55.848386Z 0 [Note] Shutting down plugin 'INNODB_CMP'
2018-11-01T07:51:55.848461Z 0 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'
2018-11-01T07:51:55.848587Z 0 [Note] Shutting down plugin 'INNODB_LOCKS'
2018-11-01T07:51:55.848663Z 0 [Note] Shutting down plugin 'INNODB_TRX'
2018-11-01T07:51:55.848788Z 0 [Note] Shutting down plugin 'InnoDB'
2018-11-01T07:51:55.848999Z 0 [Note] InnoDB: FTS optimize thread exiting.
2018-11-01T07:51:55.849153Z 0 [Note] InnoDB: Starting shutdown...
2018-11-01T07:51:57.584628Z 0 [Note] InnoDB: Shutdown completed; log sequence number 10749562
2018-11-01T07:51:57.586403Z 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2018-11-01T07:51:57.586419Z 0 [Note] Shutting down plugin 'CSV'
2018-11-01T07:51:57.586424Z 0 [Note] Shutting down plugin 'MEMORY'
2018-11-01T07:51:57.586427Z 0 [Note] Shutting down plugin 'MyISAM'
2018-11-01T07:51:57.586433Z 0 [Note] Shutting down plugin 'MRG_MYISAM'
2018-11-01T07:51:57.586435Z 0 [Note] Shutting down plugin 'sha256_password'
2018-11-01T07:51:57.586437Z 0 [Note] Shutting down plugin 'mysql_old_password'
2018-11-01T07:51:57.586439Z 0 [Note] Shutting down plugin 'mysql_native_password'
2018-11-01T07:51:57.586545Z 0 [Note] Shutting down plugin 'binlog'
2018-11-01T07:51:57.590977Z 0 [Note] mysqld: Shutdown complete

配置文件my.cnf

[mysql]
port = 3306
socket = /var/run/mysqld/mysqld.sock

[mysqld]

server-id = 1
default-storage-engine = InnoDB
socket = /var/run/mysqld/mysqld.sock
pid-file = /var/run/mysqld/mysql.pid

key-buffer-size = 32M

max-allowed-packet = 16M
max-connect-errors = 1000000
skip-name-resolve
sysdate-is-now = 1
sql-mode = STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_AUTO_VALUE_ON_ZERO,NO_ENGINE_SUBSTITUTION,NO_ZERO_DATE,NO_ZERO_IN_DATE,ONLY_FULL_GROUP_BY
explicit_defaults_for_timestamp=true

datadir = /var/lib/mysql/

log-bin = /var/lib/mysql/mysql-bin
expire-logs-days = 14
sync-binlog = 1

tmp-table-size = 32M
max-heap-table-size = 32M
query-cache-type = 0
query-cache-size = 0
max-connections = 500
thread-cache-size = 50
open-files-limit = 65535
table-definition-cache = 1024
table-open-cache = 250

innodb-flush-method = O_DIRECT
innodb-log-files-in-group = 2
innodb-log-file-size = 64M
innodb-flush-log-at-trx-commit = 1
innodb-file-per-table = 1
innodb-buffer-pool-size = 160M

#log-error = /var/lib/mysql/mysql-error.log
#log-queries-not-using-indexes = 1
slow-query-log = 1
slow-query-log-file = /var/lib/mysql/mysql-slow.log
阅读 4.6k
1 个回答
✓ 已被采纳新手上路,请多包涵

无解,换了个版本的镜像又正常了

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题