MySQL 无法启动。[错误] 无法启动服务器:绑定到 TCP/IP 端口:没有此文件或目录

MySQL 无法启动。[错误] 无法启动服务器:绑定到 TCP/IP 端口:没有此文件或目录

我的 MySQL 服务器还没有启动。我以前用过这个设置,但是今天不起作用。

我有一个 Laragon (WAMP) 的本地配置。它看起来像是一些损坏的文件,但我不知道如何修复它。

我的 MySQL 在端口 3306 上运行。我发出了一个netstat -an命令,但端口 3306 上没有任何进程。

以下是 MySQL 日志:

2019-06-30T21:11:11.193517Z 0 [Warning] Insecure configuration for --secure-file-priv: Current value does not restrict location of generated files. Consider setting it to a valid, non-empty path.
2019-06-30T21:11:11.194520Z 0 [Note] C:\laragon\bin\mysql\mysql-5.7.19-winx64\bin\mysqld (mysqld 5.7.19) starting as process 19280 ...
2019-06-30T21:11:21.270388Z 0 [Warning] Insecure configuration for --secure-file-priv: Current value does not restrict location of generated files. Consider setting it to a valid, non-empty path.
2019-06-30T21:11:21.271388Z 0 [Note] C:\laragon\bin\mysql\mysql-5.7.19-winx64\bin\mysqld (mysqld 5.7.19) starting as process 9556 ...
2019-06-30T21:11:21.329394Z 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2019-06-30T21:11:21.332393Z 0 [Note] InnoDB: Uses event mutexes
2019-06-30T21:11:21.333392Z 0 [Note] InnoDB: _mm_lfence() and _mm_sfence() are used for memory barrier
2019-06-30T21:11:21.336389Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3
2019-06-30T21:11:21.339395Z 0 [Note] InnoDB: Number of pools: 1
2019-06-30T21:11:21.341392Z 0 [Note] InnoDB: Not using CPU crc32 instructions
2019-06-30T21:11:21.352391Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2019-06-30T21:11:21.373417Z 0 [Note] InnoDB: Completed initialization of buffer pool
2019-06-30T21:11:21.422637Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2019-06-30T21:11:26.310467Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2019-06-30T21:11:26.314466Z 0 [Note] InnoDB: Setting file '.\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2019-06-30T21:11:26.362467Z 0 [Note] InnoDB: File '.\ibtmp1' size is now 12 MB.
2019-06-30T21:11:26.376466Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
2019-06-30T21:11:26.378465Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
2019-06-30T21:11:26.381466Z 0 [Note] InnoDB: Waiting for purge to start
2019-06-30T21:11:26.434466Z 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 5053ms. The settings might not be optimal. (flushed=0 and evicted=0, during the time.)
2019-06-30T21:11:26.435467Z 0 [Note] InnoDB: 5.7.19 started; log sequence number 6109749964
2019-06-30T21:11:26.443470Z 0 [Note] Plugin 'FEDERATED' is disabled.
2019-06-30T21:11:26.443470Z 0 [Note] InnoDB: Loading buffer pool(s) from C:\laragon\data\mysql\mysql\ib_buffer_pool
2019-06-30T21:11:26.474469Z 0 [Note] InnoDB: Buffer pool(s) load completed at 190630 22:11:26
2019-06-30T21:11:26.475467Z 0 [Warning] Failed to set up SSL because of the following SSL library error: SSL context is not usable without certificate and private key
2019-06-30T21:11:26.482467Z 0 [Note] Server hostname (bind-address): '*'; port: 3306
2019-06-30T21:11:26.485469Z 0 [Note] IPv6 is available.
2019-06-30T21:11:26.488467Z 0 [Note]   - '::' resolves to '::';
2019-06-30T21:11:26.490468Z 0 [Note] Server socket created on IP: '::'.
2019-06-30T21:11:26.493468Z 0 [ERROR] Can't start server: Bind on TCP/IP port: No such file or directory
2019-06-30T21:11:26.497468Z 0 [ERROR] Do you already have another mysqld server running on port: 3306 ?
2019-06-30T21:11:26.503471Z 0 [ERROR] Aborting

2019-06-30T21:11:26.504471Z 0 [Note] Binlog end
2019-06-30T21:11:26.506466Z 0 [Note] Shutting down plugin 'ngram'
2019-06-30T21:11:26.509469Z 0 [Note] Shutting down plugin 'partition'
2019-06-30T21:11:26.511468Z 0 [Note] Shutting down plugin 'BLACKHOLE'
2019-06-30T21:11:26.513468Z 0 [Note] Shutting down plugin 'ARCHIVE'
2019-06-30T21:11:26.515467Z 0 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'
2019-06-30T21:11:26.518470Z 0 [Note] Shutting down plugin 'MRG_MYISAM'
2019-06-30T21:11:26.520476Z 0 [Note] Shutting down plugin 'MyISAM'
2019-06-30T21:11:26.522468Z 0 [Note] Shutting down plugin 'INNODB_SYS_VIRTUAL'
2019-06-30T21:11:26.524466Z 0 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'
2019-06-30T21:11:26.527467Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES'
2019-06-30T21:11:26.531465Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'
2019-06-30T21:11:26.534469Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'
2019-06-30T21:11:26.537467Z 0 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'
2019-06-30T21:11:26.539465Z 0 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'
2019-06-30T21:11:26.541466Z 0 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'
2019-06-30T21:11:26.544472Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'
2019-06-30T21:11:26.547469Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLES'
2019-06-30T21:11:26.549468Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'
2019-06-30T21:11:26.551465Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'
2019-06-30T21:11:26.553466Z 0 [Note] Shutting down plugin 'INNODB_FT_CONFIG'
2019-06-30T21:11:26.554466Z 0 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'
2019-06-30T21:11:26.556466Z 0 [Note] Shutting down plugin 'INNODB_FT_DELETED'
2019-06-30T21:11:26.558465Z 0 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'
2019-06-30T21:11:26.560468Z 0 [Note] Shutting down plugin 'INNODB_METRICS'
2019-06-30T21:11:26.562466Z 0 [Note] Shutting down plugin 'INNODB_TEMP_TABLE_INFO'
2019-06-30T21:11:26.564465Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'
2019-06-30T21:11:26.566465Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'
2019-06-30T21:11:26.568465Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'
2019-06-30T21:11:26.570465Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET'
2019-06-30T21:11:26.572466Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX'
2019-06-30T21:11:26.573466Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'
2019-06-30T21:11:26.575466Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM'
2019-06-30T21:11:26.577467Z 0 [Note] Shutting down plugin 'INNODB_CMP_RESET'
2019-06-30T21:11:26.579465Z 0 [Note] Shutting down plugin 'INNODB_CMP'
2019-06-30T21:11:26.580465Z 0 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'
2019-06-30T21:11:26.582467Z 0 [Note] Shutting down plugin 'INNODB_LOCKS'
2019-06-30T21:11:26.584466Z 0 [Note] Shutting down plugin 'INNODB_TRX'
2019-06-30T21:11:26.585465Z 0 [Note] Shutting down plugin 'InnoDB'
2019-06-30T21:11:26.587468Z 0 [Note] InnoDB: FTS optimize thread exiting.
2019-06-30T21:11:26.589468Z 0 [Note] InnoDB: Starting shutdown...
2019-06-30T21:11:26.695999Z 0 [Note] InnoDB: Dumping buffer pool(s) to C:\laragon\data\mysql\mysql\ib_buffer_pool
2019-06-30T21:11:26.708998Z 0 [Note] InnoDB: Buffer pool(s) dump completed at 190630 22:11:26
2019-06-30T21:11:27.836519Z 0 [Note] InnoDB: Shutdown completed; log sequence number 6109749983
2019-06-30T21:11:27.839546Z 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2019-06-30T21:11:27.841544Z 0 [Note] Shutting down plugin 'MEMORY'
2019-06-30T21:11:27.842545Z 0 [Note] Shutting down plugin 'CSV'
2019-06-30T21:11:27.843545Z 0 [Note] Shutting down plugin 'sha256_password'
2019-06-30T21:11:27.845545Z 0 [Note] Shutting down plugin 'mysql_native_password'
2019-06-30T21:11:27.847529Z 0 [Note] Shutting down plugin 'binlog'
2019-06-30T21:11:27.865520Z 0 [Note] C:\laragon\bin\mysql\mysql-5.7.19-winx64\bin\mysqld: Shutdown complete

谢谢。

答案1

写一千遍:“当某个服务不工作时,首先看看防火墙”

寻找解决方案浪费了多少时间!我重新启动了计算机,然后出现了一条 Windows 警告消息,警告我它已阻止 mysqld。

这是因为上次我处理本地站点时,我将 Laragon 配置为每次 Windows 启动时启动。这足以让 Windows 防火墙开始阻止。

答案2

如果您的系统中存在 2 个版本的 mysql,请更改新版本的 mysql 的端口或停止系统上之前版本的服务以释放端口号 3306。

相关内容