mysql报错:--initialize specified but the data directory has files in it. Aborting.
来源:互联网 发布:普陀区数据恢复 编辑:程序博客网 时间:2024/06/08 10:31
我的环境: redhat6.5
数据库版本: mysql5.7
问题: mysql安装好之后,初始化报错
安装方式: rpm包直接安装
问题原因:
mysql在进行初始化的时后,会检测数据目录是否存在,
如过不存在,mysql会创建它,
如果存在,而且这个目录里有数据,mysql会报错,并且终止初始化:
[root@server1 ~]# /etc/init.d/mysqld startInitializing MySQL database: 2017-06-26T02:33:40.212541Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).2017-06-26T02:33:40.215791Z 0 [ERROR] --initialize specified but the data directory has files in it. Aborting.2017-06-26T02:33:40.215877Z 0 [ERROR] Aborting
解决方法:
将这个数据目录删掉,或者重命名,如果数据比较重要,建议重命名,后期再重新导入就ok了
我用的rpm包安装,默认数据目录在
/var/lib/mysql/
我将它直接删掉
rm -fr /var/lib/mysql
完了重启,成功:
[root@server1 lib]# /etc/init.d/mysqld restartStopping mysqld: [ OK ]Initializing MySQL database: [ OK ]Installing validate password plugin: [ OK ]Starting mysqld: [ OK ]
阅读全文
2 0
- mysql报错:--initialize specified but the data directory has files in it. Aborting.
- MySQL5.7 启动报错:initialize specified but the data directory has files in it. Aborting.
- --initialize specified but the data directory has files in it. Aborting
- MyEclipse报错:It appears that the Web Project,“”,has no Web Root directory setup
- Dataguard DBLOG FILE NAME CONVERT has been set but files are created in a different directory (文档 ID
- The goal you specified requires a project to execute but there is no POM in this directory
- The goal you specified requires a project to execute but there is no POM in this directory
- [ERROR] The goal you specified requires a project to execute but there is no POM in this directory
- The goal you specified requires a project to execute but there is no POM in this directory...
- [ERROR] The goal you specified requires a project to execute but there is no POM in this directory
- 系统报错:Error the user data image is used by another emulator. aborting
- 关于VS2003.NET的“The solution has more than 16384 VC files in it.”问题。
- A file with the correct name was found in this directory, but it is not the correct one.
- Adapter报错:The content of the adapter has changed but ListView did not receive a
- Adapter报错:The content of the adapter has changed but ListView did not receive a
- Adapter报错:The content of the adapter has changed but ListView did not receive a
- Info.plist文件报错,The data couldn’t be read because it isn’t in the correct format.
- Accessing a directory and all the files within it
- android 保存屏幕长亮方法
- spring3.2及以下的版本和 jdk8不兼容的问题
- LeetCode@HashMap_389_Find_the_Difference
- php批量处理多维数组替换,删除部分键值
- org.aspectj.lang.JoinPoint-中文简要API
- mysql报错:--initialize specified but the data directory has files in it. Aborting.
- 算法学习--编程易错小知识记录汇总
- 文章理解与写作
- xampp 修改数据库 密码
- mysql 5.0存储过程学习总结 (经典)
- Swift中的访问控制关键字
- 触发JVM进行Full GC的情况及应对策略
- thymeleaf+spring boot 页面hashmap取值
- Mac OS X下Maven的安装与配置