启动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 ...
随机推荐
- 题解 CF409A 【The Great Game】
题目传送门. 思路: 首先我们定义\(2\)个字符串,分别存放 TEAM 1 与 TEAM 2 的出招顺序.接着再定义\(2\)个变量,存放 TEAM 1 与 TEAM 2 的分数. string s ...
- SSM+layui实现增删改查
前端使用layui框架,后端使用Spring+SpringMVC+Mybatis的集合框架,数据库使用MySQL,完成对一张用户表的增删改查操作. 前后端分离开发,即前端的HTML页面通过ajax技术 ...
- js的6道基础题(笔试常考题)
转载:http://www.bubuko.com/infodetail-20477.html 题目一:找出数字数组中最大的元素 var arr=[0,1,2,3,4,5,6,7,8,9]; c ...
- HttpModule介绍
https://cloud.tencent.com/developer/article/1347498 引言 Http 请求处理流程 和 Http Handler 介绍 这两篇文章里,我们首先了解了H ...
- 牛客CSP-S提高组赛前集训营2 赛后总结
比赛链接 A.服务器需求 维护每天需要的服务器数量的全局最大值(记为\(Max\))和总和(记为\(sum\)),那么答案为: \[max(Max,\lceil\dfrac{sum}{m}\rceil ...
- New Skateboard
Max wants to buy a new skateboard. He has calculated the amount of money that is needed to buy a new ...
- 关于微信小程序
1.设置了tabBar的页面,好像用navigator跳不过去.
- MySql 中关键字 case when then else end 的用法
解释: SELECT case -------------如果 ' then '男' -------------sex='1',则返回值'男' ' then '女' -------------sex= ...
- codeforces 1269D. Domino for Young (二分图证明/结论题)
链接:https://codeforces.com/contest/1269/problem/D 题意:给一个不规则的网格,在上面放置多米诺骨牌,多米诺骨牌长度要么是1x2,要么是2x1大小,问最多放 ...
- MySQL排序查询
语法:① SELECT 查询 (要找的东西)②FROM 表 (在哪个表找)③[WHERE 筛选条件](取出重要的或有用的)④ORDER BY 排序列表 [ASC|DESC] (排序的关键字 字段)([ ...