相关推荐recommended
【mysql】[ERROR] --initialize specified but the data directory has files in it. Aborting.
作者:mmseoamin日期:2024-01-18

执行 mysqld --initialize

[ERROR] --initialize specified but the data directory has files in it. Aborting.

 

[错误]--指定了初始化,但数据目录中有文件。正在中止

【mysql】[ERROR] --initialize specified but the data directory has files in it. Aborting.,第1张

清除掉 数据文件。

对应的目录 : /usr/local/mysql/data

查看现在目录内容:

【mysql】[ERROR] --initialize specified but the data directory has files in it. Aborting.,第2张

把这些都删除掉。

然后重新执行:

mysqld --initialize

【mysql】[ERROR] --initialize specified but the data directory has files in it. Aborting.,第3张

可以正常执行了。