xpf0000 / PhpWebStudy

Powerful Web Server and PHP Environment. Support macOS / Windows / Linux
https://www.macphpstudy.com
BSD 3-Clause "New" or "Revised" License
623 stars 53 forks source link

从v1.6.1升到v2.3.2后mysql启动报错,回退版本后正常 #79

Closed hackbeex closed 4 months ago

hackbeex commented 6 months ago

v2.3.2的mysql启动报错:

2024-03-17T03:44:12.739842Z 0 [ERROR] --initialize specified but the data directory has files in it. Aborting.
2024-03-17T03:44:12.739947Z 0 [ERROR] Aborting

mysql版本5.7,配置文件没动,使用默认的

xpf0000 commented 6 months ago

~/Library/PhpWebStudy/server/mysql这个文件夹, 检查下是否有 my-5.7.cnf 这个文件, 和 data-5.7 这个数据库文件夹. 如果没有, 看下是否有 my-5.7.xx.cnf和data-5.7.xx 这种. 有的话, 把名字替换成my-5.7.cnf和data-5.7. 如果是初次使用5.7. 原来没有数据的话. 把文件夹下的5.7相关的配置文件和数据库文件夹全部删了. 然后再启动mysql试试.