MySql启动错误 ' ERROR! The server quit without updating PID file'

标签 mysql

我已经尝试了 S.O 上的每个链接,但每次尝试启动 MySQL 时仍然得到相同的结果。以下是 .err 文件中的日志。

2018-01-07T06:58:11.729500Z 0 [Warning] Setting lower_case_table_names=2 because file system for /usr/local/var/mysql/ is case insensitive
2018-01-07T06:58:11.731659Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2018-01-07T06:58:11.731673Z 0 [Note] InnoDB: Uses event mutexes
2018-01-07T06:58:11.731679Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2018-01-07T06:58:11.731682Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3
2018-01-07T06:58:11.731969Z 0 [Note] InnoDB: Number of pools: 1
2018-01-07T06:58:11.732068Z 0 [Note] InnoDB: Using CPU crc32 instructions
2018-01-07T06:58:11.733672Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2018-01-07T06:58:11.745339Z 0 [Note] InnoDB: Completed initialization of buffer pool
2018-01-07T06:58:11.761905Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2018-01-07T06:58:11.906535Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2018-01-07T06:58:11.906692Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2018-01-07T06:58:11.918639Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2018-01-07T06:58:11.919925Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
2018-01-07T06:58:11.919938Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
2018-01-07T06:58:11.920116Z 0 [Note] InnoDB: Waiting for purge to start
2018-01-07T06:58:11.974340Z 0 [Note] InnoDB: 5.7.20 started; log sequence number 129183358
2018-01-07T06:58:11.974571Z 0 [Note] InnoDB: Loading buffer pool(s) from /usr/local/var/mysql/ib_buffer_pool
2018-01-07T06:58:11.974744Z 0 [Note] Plugin 'FEDERATED' is disabled.
2018-01-07T06:58:11.974853Z 0 [Note] InnoDB: Buffer pool(s) load completed at 180107 12:28:11
2018-01-07T06:58:11.983233Z 0 [Note] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them.
2018-01-07T06:58:11.983254Z 0 [Note] Skipping generation of SSL certificates as certificate files are present in data directory.
2018-01-07T06:58:11.983981Z 0 [Warning] CA certificate ca.pem is self signed.
2018-01-07T06:58:11.984032Z 0 [Note] Skipping generation of RSA key pair as key files are present in data directory.
2018-01-07T06:58:11.989041Z 0 [Note] Server hostname (bind-address): '127.0.0.1'; port: 3306
2018-01-07T06:58:11.989070Z 0 [Note]   - '127.0.0.1' resolves to '127.0.0.1';
2018-01-07T06:58:11.989136Z 0 [Note] Server socket created on IP: '127.0.0.1'.
2018-01-07T06:58:11.989166Z 0 [ERROR] Can't start server: Bind on TCP/IP port: Address already in use
2018-01-07T06:58:11.989169Z 0 [ERROR] Do you already have another mysqld server running on port: 3306 ?
2018-01-07T06:58:11.989199Z 0 [ERROR] Aborting

最佳答案

看起来您有一些其他软件正在使用端口 3306。MySQL 使用此端口,但无法绑定(bind)到它,因为它正在使用中。结束其他软件并尝试再次启动MySQL。

如果您需要让其他软件与MySQL同时运行,则必须将其中一个软件的默认端口更改为其他未使用的端口。

更改 MySQL 中的端口。如果您使用的是 Windows,请找到用于安装 MySQL 的 my.ini 文件,在文本编辑器中打开此文件并查找以下部分:

# The TCP/IP Port the MySQL Server will listen on
port=3306

然后更改端口号,保存文件,并重新启动MySQL服务。

关于MySql启动错误 ' ERROR! The server quit without updating PID file',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48135119/

相关文章:

mysql - 一堆子查询的可能替代方案

php - 如何进一步过滤mysql中的GROUP BY记录?

mysql - 当请求超过 4MB 时 SIGPIPE 崩溃

MySql 查询多对多关系

MYSQL:如何在 SELECT 中执行 INSERT?

mysql - 如何从 'Case When' 条件开始计数

sql - MySQL中如何为每个topic_id选择最后两条记录

php - 帮助MYSQL查询使用PHP搭建博客存档导航菜单

php - 如何为特定酒店添加房间类别

php - 按订单选择语句