
当电脑输入这条命令以试图初始化数据库的时候,出现这样的错误。
2023-10-23T09:04:21.258180Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2023-10-23T09:04:21.258237Z 0 [Warning] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.
2023-10-23T09:04:21.258241Z 0 [Warning] 'NO_AUTO_CREATE_USER' sql mode was not set.
2023-10-23T09:04:21.260667Z 0 [ERROR] --initialize specified but the data directory has files in it. Aborting.
2023-10-23T09:04:21.261250Z 0 [ERROR] Aborting
后面我上网上查,再结合我自身的情况进行分析才知道,是我原来的MySQL删除不干净,但一时半会儿又不知道怎么删除,只能在安装目录里面新建一个data文件夹了

然后,我在my.ini文件对data文件进行修改

最后错误也是解决了
文章描述了在尝试初始化MySQL数据库时遇到的一系列警告和错误,包括关于timestamp默认值的提示、SQL模式设置以及因数据目录残留导致的初始化失败。作者提到原MySQL未完全删除,解决方法是清理数据目录并调整my.ini配置。



1884

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



