启动MySQL5.7时报错:initialize specified but the data directory has files in it. Aborting.
启动MySQL5.7时报错:initialize specified but the data directory has files in it. Aborting

解决方法:
vim /etc/my.cnf
查看文件,寻找datadir=...
查看到:datadir=/usr/local/mysql/data,
这个是data保存目录。
进入/usr/local/mysql/data后,查看到确实有数据:
将/usr/local/mysql/data备份,
cd /usr/local/mysql
mv data data.bak
接着执行:
# mysqld --initialize-insecure --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data
# systemctl start mysqld
启动MySQL5.7时报错:initialize specified but the data directory has files in it. Aborting.的更多相关文章
- MySQL5.7 启动报错:initialize specified but the data directory has files in it. Aborting.
$ vi /etc/my.cnf ## datadir=/var/lib/mysql, 这个是data保存目录,进入/var/lib/mysql后,查看到确实有数据. #解决方法:将/var/lib/ ...
- 安装mysql时出现initialize specified but the data directory has files in in.Aborting.该如何解决
eclipse中写入sql插入语句时,navicat中显示的出现乱码(???). 在修改eclipse工作空间编码.navicate中的数据库编码.mysql中my.ini中的配置之后还是出现乱码. ...
- mysqldMY-010457] [Server] --initialize specified but the data directory has files in it. Aborting. 2020-12
删除mysql的/var/lib/mysql目录下的所有文件 https://blog.csdn.net/tr1912/article/details/81271851 # mysqld --init ...
- --initialize specified but the data directory has files in it. Aborting
出错版本: mysql 5.7 why? yum 安装数据库时候,默认数据存放目录为 /var/lib/mysql,然而这个目录下有数据 way? 进入 /var/lb/mysql 目录下清空该目录下 ...
- MYSQL常见安装错误集:[ERROR] --initialize specified but the data directory has files in it. Abort
1.[ERROR] --initialize specified but the data directory has files in it. Abort [错误] -初始化指定,但数据目录中有文件 ...
- mysql --initialize specified but the data directory has files in it
删除 *.ini 文件中的datadir=“....”目录下的文件,即可.
- 启动Oracle数据库时报错ORA-00119 & ORA-00132
今天启动Oracle数据库时报错ORA-00119 & ORA-00132,找到解决方法做个记录,方便日后查看. 若是ORACLE不提示错误的话,可以自己查看ORACLE的日志文件. Orac ...
- Kettle 7启动 Spoon.bat 时报错“A Java Exception has occurred.”的解决方法
最近在研究Kettle 时出现启动时报错“A Java Exception has occurred.”的问题.刚开始没搞明白是什么原因,后来发现是jdk版本的问题.出现这个错误原因是 Kettle ...
- 启动mysql 失败,“Warning:The /usr/local/mysql/data directory is not owned by the 'mysql' or '_mysql' ”
一.Mac OS X的升级或其他原因可能会导致MySQL启动或开机自动运行时 在MySQL操作面板上会提示“Warning:The /usr/local/mysql/data directory is ...
随机推荐
- Intellij IDEA史上最全快捷键大全
古人有云:工欲善其事,必先利其器,要是只是手握利器,而不能发挥其最大的效益,那无异于赤手空拳,对敌对垒. 那古人所云,未得其精髓,只能为碎语闲言尔. 自动代码 常用的有fori/sout/psvm+T ...
- RN开发-Flex
1.容器属性 (1). display : flex | inline-flex (块级伸缩容器 | 行内级伸缩容器) (2). flex-direction : row ...
- msfconsole启动失败并报错`not_after=': bignum too big to convert into `long'的解决方法
1.启动msfconsole失败并报如下错误: /usr/share/metasploit-framework/lib/msf/core/payload/android.rb:86:in `not_a ...
- 跨站点脚本攻击XSS
来源:http://www.freebuf.com/articles/web/15188.html 跨站点脚本攻击是一种Web应用程序的攻击,攻击者尝试注入恶意脚本代码到受信任的网站上执行恶意操作.在 ...
- Cannot find module 'less-bundle-promise'
Error: Cannot find module 'less-bundle-promise' 解决办法 :npm install less-bundle-promise --save
- 转载:Cubic interpolation
https://www.paulinternet.nl/?page=bicubic Cubic interpolation If the values of a function f(x) and i ...
- [一本通学习笔记] AC自动机
AC自动机可以看作是在Trie树上建立了fail指针,在这里可以看作fail链.如果u的fail链指向v,那么v的对应串一定是u对应串在所给定字符串集合的后缀集合中的最长的后缀. 我们考虑一下如何实现 ...
- C++ 深拷贝实例-改变原生数组
深拷贝 main.cpp #include <stdio.h> #include "IntArray.h" int main() { IntArray a(); ; i ...
- 计算机网络,HTTP - 如何查看一个网站是否使用HTTP/2?
方法 HTTP/2用":authority"头部代替"Host"头部. Chrome F12里面,HTTP/1.1有"view source" ...
- Django路由层、视图层
一.路由匹配: 第一个参数是正则表达式,匹配规则按照从上往下一次匹配,匹配到一个后立即停止 urlpatterns = [ url(r'^admin/', admin.site.urls), url( ...