提示错误代码,我的centos版本是6.4的
[root@localhost /]# service mysqld start
Initializing MySQL database: 2021-05-28T18:32:38.764172Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2021-05-28T18:32:38.767173Z 0 [ERROR] --initialize specified but the data directory has files in it. Aborting.
2021-05-28T18:32:38.767223Z 0 [ERROR] Aborting
怎么解决呢
[FAILED]
MySQL的data目录下有文件,需要将目录清空掉,然后对MySQL进行初始化再启动。
删除 /var/lib/mysql/ 文件夹,再试试重启
https://blog.csdn.net/weixin_42313749/article/details/117197024
您的问题已经有小伙伴解答了,请点击【采纳】按钮,采纳帮您提供解决思路的答案,给回答的人一些鼓励哦~~
ps:开通问答VIP,享受5次/月 有问必答服务,了解详情↓↓↓
【电脑端】戳>>> https://vip.csdn.net/askvip?utm_source=1146287632
【APP 】 戳>>> https://mall.csdn.net/item/52471?utm_source=1146287632