我在我的ubuntu映像容器上安装mariadb-server
,当我想启动mysql服务失败时,error.log文件包含:
180228 16:41:24 [Note] InnoDB: innodb_empty_free_list_algorithm has been changed to legacy because of small buffer pool size. In order to use backoff, increase buffer pool at least up to 20MB.
180228 16:41:24 [Note] InnoDB: Using mutexes to ref count buffer pool pages
180228 16:41:24 [Note] InnoDB: The InnoDB memory heap is disabled
180228 16:41:24 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
180228 16:41:24 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
180228 16:41:24 [Note] InnoDB: Compressed tables use zlib 1.2.8
180228 16:41:24 [Note] InnoDB: Using Linux native AIO
180228 16:41:24 [Note] InnoDB: Using CPU crc32 instructions
180228 16:41:24 [Note] InnoDB: Initializing buffer pool, size = 128.0M
180228 16:41:24 [Note] InnoDB: Completed initialization of buffer pool
180228 16:41:24 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created!
180228 16:41:24 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB
180228 16:41:24 [Note] InnoDB: Database physically writes the file full: wait...
180228 16:41:24 [Note] InnoDB: Setting log file ./ib_logfile101 size to 48 MB
180228 16:41:26 [Note] InnoDB: Setting log file ./ib_logfile1 size to 48 MB
180228 16:41:27 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0
180228 16:41:27 [Warning] InnoDB: New log files created, LSN=45781
180228 16:41:27 [Note] InnoDB: Doublewrite buffer not found: creating new
180228 16:41:27 [Note] InnoDB: Doublewrite buffer created
180228 16:41:27 [Note] InnoDB: 128 rollback segment(s) are active.
180228 16:41:27 [Warning] InnoDB: Creating foreign key constraint system tables.
180228 16:41:27 [Note] InnoDB: Foreign key constraint system tables created
180228 16:41:27 [Note] InnoDB: Creating tablespace and datafile system tables.
180228 16:41:27 [Note] InnoDB: Tablespace and datafile system tables created.
180228 16:41:27 [Note] InnoDB: Waiting for purge to start
180228 16:41:27 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.36-82.2 started; log sequence number 0
180228 16:41:39 [Note] InnoDB: FTS optimize thread exiting.
180228 16:41:39 [Note] InnoDB: Starting shutdown...
180228 16:41:40 [Note] InnoDB: Waiting for page_cleaner to finish flushing of buffer pool
180228 16:41:42 [Note] InnoDB: Shutdown completed; log sequence number 1616697
180228 16:41:42 [Note] InnoDB: innodb_empty_free_list_algorithm has been changed to legacy because of small buffer pool size. In order to use backoff, increase buffer pool at least up to 20MB.
180228 16:41:42 [Note] InnoDB: Using mutexes to ref count buffer pool pages
180228 16:41:42 [Note] InnoDB: The InnoDB memory heap is disabled
180228 16:41:42 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
180228 16:41:42 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
180228 16:41:42 [Note] InnoDB: Compressed tables use zlib 1.2.8
180228 16:41:42 [Note] InnoDB: Using Linux native AIO
180228 16:41:42 [Note] InnoDB: Using CPU crc32 instructions
180228 16:41:42 [Note] InnoDB: Initializing buffer pool, size = 128.0M
180228 16:41:42 [Note] InnoDB: Completed initialization of buffer pool
180228 16:41:42 [Note] InnoDB: Highest supported file format is Barracuda.
180228 16:41:42 [Note] InnoDB: 128 rollback segment(s) are active.
180228 16:41:42 [Note] InnoDB: Waiting for purge to start
180228 16:41:42 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.36-82.2 started; log sequence number 1616697
180228 16:41:42 [Note] InnoDB: FTS optimize thread exiting.
180228 16:41:42 [Note] InnoDB: Starting shutdown...
180228 16:41:43 [Note] InnoDB: Waiting for page_cleaner to finish flushing of buffer pool
180228 16:41:45 [Note] InnoDB: Shutdown completed; log sequence number 1616707
180228 16:41:45 [Note] InnoDB: innodb_empty_free_list_algorithm has been changed to legacy because of small buffer pool size. In order to use backoff, increase buffer pool at least up to 20MB.
180228 16:41:45 [Note] InnoDB: Using mutexes to ref count buffer pool pages
180228 16:41:45 [Note] InnoDB: The InnoDB memory heap is disabled
180228 16:41:45 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
180228 16:41:45 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
180228 16:41:45 [Note] InnoDB: Compressed tables use zlib 1.2.8
180228 16:41:45 [Note] InnoDB: Using Linux native AIO
180228 16:41:45 [Note] InnoDB: Using CPU crc32 instructions
180228 16:41:45 [Note] InnoDB: Initializing buffer pool, size = 128.0M
180228 16:41:45 [Note] InnoDB: Completed initialization of buffer pool
180228 16:41:45 [Note] InnoDB: Highest supported file format is Barracuda.
180228 16:41:46 [Note] InnoDB: 128 rollback segment(s) are active.
180228 16:41:46 [Note] InnoDB: Waiting for purge to start
180228 16:41:46 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.36-82.2 started; log sequence number 1616707
180228 16:41:46 [Note] Plugin 'FEEDBACK' is disabled.
180228 16:41:46 [Note] InnoDB: FTS optimize thread exiting.
180228 16:41:46 [Note] InnoDB: Starting shutdown...
180228 16:41:47 [Note] InnoDB: Waiting for page_cleaner to finish flushing of buffer pool
180228 16:41:48 [Note] InnoDB: Shutdown completed; log sequence number 1616717
180228 18:30:06 [Note] InnoDB: innodb_empty_free_list_algorithm has been changed to legacy because of small buffer pool size. In order to use backoff, increase buffer pool at least up to 20MB.
180228 18:30:06 [Note] InnoDB: Using mutexes to ref count buffer pool pages
180228 18:30:06 [Note] InnoDB: The InnoDB memory heap is disabled
180228 18:30:06 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
180228 18:30:06 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
180228 18:30:06 [Note] InnoDB: Compressed tables use zlib 1.2.8
180228 18:30:06 [Note] InnoDB: Using Linux native AIO
180228 18:30:06 [Note] InnoDB: Using CPU crc32 instructions
180228 18:30:06 [Note] InnoDB: Initializing buffer pool, size = 128.0M
180228 18:30:06 [Note] InnoDB: Completed initialization of buffer pool
180228 18:30:06 [Note] InnoDB: Highest supported file format is Barracuda.
180228 18:30:06 [Note] InnoDB: 128 rollback segment(s) are active.
180228 18:30:06 [Note] InnoDB: Waiting for purge to start
180228 18:30:06 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.36-82.2 started; log sequence number 1616747
180228 18:30:06 [Note] Plugin 'FEEDBACK' is disabled.
180228 18:30:06 [Note] Server socket created on IP: '127.0.0.1'.
180228 18:30:06 [ERROR] Can't start server: Bind on TCP/IP port. Got error: 98: Address already in use
180228 18:30:06 [ERROR] Do you already have another mysqld server running on port: 3306 ?
180228 18:30:06 [ERROR] Aborting
180228 18:30:06 [Note] InnoDB: FTS optimize thread exiting.
180228 18:30:06 [Note] InnoDB: Starting shutdown...
180228 18:30:07 [Note] InnoDB: Waiting for page_cleaner to finish flushing of buffer pool
180228 18:30:09 [Note] InnoDB: Shutdown completed; log sequence number 1616757
180228 18:30:09 [Note] mysqld: Shutdown complete
180228 18:32:22 [Note] InnoDB: innodb_empty_free_list_algorithm has been changed to legacy because of small buffer pool size. In order to use backoff, increase buffer pool at least up to 20MB.
180228 18:32:22 [Note] InnoDB: Using mutexes to ref count buffer pool pages
180228 18:32:22 [Note] InnoDB: The InnoDB memory heap is disabled
180228 18:32:22 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
180228 18:32:22 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
180228 18:32:22 [Note] InnoDB: Compressed tables use zlib 1.2.8
180228 18:32:22 [Note] InnoDB: Using Linux native AIO
180228 18:32:22 [Note] InnoDB: Using CPU crc32 instructions
180228 18:32:22 [Note] InnoDB: Initializing buffer pool, size = 128.0M
180228 18:32:22 [Note] InnoDB: Completed initialization of buffer pool
180228 18:32:22 [Note] InnoDB: Highest supported file format is Barracuda.
180228 18:32:22 [Note] InnoDB: 128 rollback segment(s) are active.
180228 18:32:22 [Note] InnoDB: Waiting for purge to start
180228 18:32:22 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.36-82.2 started; log sequence number 1616757
180228 18:32:22 [Note] Plugin 'FEEDBACK' is disabled.
180228 18:32:22 [Note] Server socket created on IP: '127.0.0.1'.
180228 18:32:22 [ERROR] Can't start server: Bind on TCP/IP port. Got error: 98: Address already in use
180228 18:32:22 [ERROR] Do you already have another mysqld server running on port: 3306 ?
180228 18:32:22 [ERROR] Aborting
180228 18:32:22 [Note] InnoDB: FTS optimize thread exiting.
180228 18:32:22 [Note] InnoDB: Starting shutdown...
180228 18:32:23 [Note] InnoDB: Waiting for page_cleaner to finish flushing of buffer pool
180228 18:32:25 [Note] InnoDB: Shutdown completed; log sequence number 1616767
180228 18:32:25 [Note] mysqld: Shutdown complete
180228 18:33:12 [Note] InnoDB: Using mutexes to ref count buffer pool pages
180228 18:33:12 [Note] InnoDB: The InnoDB memory heap is disabled
180228 18:33:12 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
180228 18:33:12 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
180228 18:33:12 [Note] InnoDB: Compressed tables use zlib 1.2.8
180228 18:33:12 [Note] InnoDB: Using Linux native AIO
180228 18:33:12 [Note] InnoDB: Using CPU crc32 instructions
180228 18:33:12 [Note] InnoDB: Initializing buffer pool, size = 8.0G
180228 18:33:12 [Note] InnoDB: Completed initialization of buffer pool
180228 18:33:13 [Note] InnoDB: Highest supported file format is Barracuda.
180228 18:33:13 [Note] InnoDB: 128 rollback segment(s) are active.
180228 18:33:13 [Note] InnoDB: Waiting for purge to start
180228 18:33:13 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.36-82.2 started; log sequence number 1616777
180228 18:33:13 [Note] Plugin 'FEEDBACK' is disabled.
180228 18:33:13 [Note] Server socket created on IP: '127.0.0.1'.
180228 18:33:13 [ERROR] Can't start server: Bind on TCP/IP port. Got error: 98: Address already in use
180228 18:33:13 [ERROR] Do you already have another mysqld server running on port: 3306 ?
180228 18:33:13 [ERROR] Aborting
180228 18:33:13 [Note] InnoDB: FTS optimize thread exiting.
180228 18:33:13 [Note] InnoDB: Starting shutdown...
180228 18:33:14 [Note] InnoDB: Waiting for page_cleaner to finish flushing of buffer pool
180228 18:33:16 [Note] InnoDB: Shutdown completed; log sequence number 1616787
180228 18:33:16 [Note] mysqld: Shutdown complete
180228 18:41:32 [Note] InnoDB: innodb_empty_free_list_algorithm has been changed to legacy because of small buffer pool size. In order to use backoff, increase buffer pool at least up to 20MB.
180228 18:41:32 [Note] InnoDB: Using mutexes to ref count buffer pool pages
180228 18:41:32 [Note] InnoDB: The InnoDB memory heap is disabled
180228 18:41:32 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
180228 18:41:32 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
180228 18:41:32 [Note] InnoDB: Compressed tables use zlib 1.2.8
180228 18:41:32 [Note] InnoDB: Using Linux native AIO
180228 18:41:32 [Note] InnoDB: Using CPU crc32 instructions
180228 18:41:32 [Note] InnoDB: Initializing buffer pool, size = 128.0M
180228 18:41:32 [Note] InnoDB: Completed initialization of buffer pool
180228 18:41:32 [Note] InnoDB: Highest supported file format is Barracuda.
180228 18:41:32 [Note] InnoDB: 128 rollback segment(s) are active.
180228 18:41:32 [Note] InnoDB: Waiting for purge to start
180228 18:41:32 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.36-82.2 started; log sequence number 1616817
180228 18:41:32 [Note] Plugin 'FEEDBACK' is disabled.
180228 18:41:32 [Note] Server socket created on IP: '127.0.0.1'.
180228 18:41:32 [ERROR] Can't start server: Bind on TCP/IP port. Got error: 98: Address already in use
180228 18:41:32 [ERROR] Do you already have another mysqld server running on port: 3306 ?
180228 18:41:32 [ERROR] Aborting
180228 18:41:32 [Note] InnoDB: FTS optimize thread exiting.
180228 18:41:32 [Note] InnoDB: Starting shutdown...
180228 18:41:33 [Note] InnoDB: Waiting for page_cleaner to finish flushing of buffer pool
180228 18:41:35 [Note] InnoDB: Shutdown completed; log sequence number 1616827
180228 18:41:35 [Note] mysqld: Shutdown complete
首先,/ run / mysqld目录为空,我收到错误
ERROR 2002(HY000):无法通过socket' /var/run/mysqld/mysqld.sock'连接到本地MySQL服务器; (2)
我创建了内容为1773
的mysqld.sock文件,错误已更改为'文件或目录不存在'到' 111连接被拒绝'。
问题是什么?
答案 0 :(得分:1)
你有另一个实例Docker或其他(不能告诉你整体设置是什么)使用相同的端口,它告诉你:
Can't start server: Bind on TCP/IP port. Got error: 98: Address already in use
180228 18:41:32 [ERROR] Do you already have another mysqld server running on port: 3306 ?
尝试docker ps -a
查看是否还有其他可能正在使用该端口的容器。如果有,您可以单独或全部删除它们:
docker rm $(docker ps -aq)
如果您尝试绑定到主机(您的计算机的)端口以及容器,您可以运行端口扫描(search for how based on your OS)以查看它是否正在使用那里。