發生了什麼
自己在寫安裝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 解決。。。