发生了什么
自己在写 安装jdk的bat脚本 时,出了点问题,为了找出问题参考了mysql安装脚本时,编写的过程中不小心执行了mysql安装脚本,等反应过来的时候,就提示这个错误:

网上百度了很多 1067的解决办法,找了几个靠谱的解决办法,其他的感觉都不靠谱。。。。。
查看日志
报错日志查看方式大致如下
①事件查看器
windows日志 --》 应用程序 --》 查找来源为mysql的日志,重点查看 错误 级别的日志
在常规中查看报错日志

②mysql日志文件
日志文件位置 : mysql-5.6.35-winx64\data*.err
日志文件是文本文件,直接使用文本编辑器查看即可
[Note] Plugin 'FEDERATED' is disabled. [Note] InnoDB: Using atomics to ref count buffer pool pages [Note] InnoDB: The InnoDB memory heap is disabled [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions [Note] InnoDB: Memory barrier is not used [Note] InnoDB: Compressed tables use zlib 1.2.3 [Note] InnoDB: Not using CPU crc32 instructions [Note] InnoDB: Initializing buffer pool, size = 128.0M [Note] InnoDB: Completed initialization of buffer pool [Note] InnoDB: Highest supported file format is Barracuda. [Note] InnoDB: 128 rollback segment(s) are active. [Note] InnoDB: Waiting for purge to start [Note] InnoDB: 5.6.35 started; log sequence number 1625977 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: 34a1a2ae-f6cd-11ec-bc34-005056c00001. [Note] Server hostname (bind-address): '*'; port: 3306 [Note] IPv6 is available. [Note] - '::' resolves to '::'; [Note] Server socket created on IP: '::'. [ERROR] Can't start server: Bind on TCP/IP port: No error [ERROR] Do you already have another mysqld server running on port: 3306 ? [ERROR] Aborting
重点就是 [ERROR] 级别的报错日志
解决
[ERROR] Can't start server: Bind on TCP/IP port: No error [ERROR] Do you already have another mysqld server running on port: 3306 ? [ERROR] Aborting
三行报错无非就是端口号 或IP地址。
1.查看端口是否被占用
netstat -aon|findstr "3306" 返回为空,端口未被占用,

2.修改端口号和IP地址
配置文件中修改端口号和IP地址,重启计算机,重新注册mysql服务

重新打开mysql服务 报错依旧。
3.脑子灵光一闪,重置网络----解决
重置网络,重启计算机,重新打开mysql,启动正常。。。nice 解决。。。


本文讲述了作者在编写JDK安装脚本时意外触发了MySQL安装,导致端口冲突的错误。详细解析了报错日志,包括查看应用程序日志和mysql.err文件,解决过程涉及检查端口占用、修改配置及重置网络。最终提供了一个有效的方法来避免类似问题。
558

被折叠的 条评论
为什么被折叠?



