mysql报错--initialize specified but the data directory has files in it. Aborting.

初始化msyql时出现报错

C:\mysql-5.7.19-winx64> C:\mysql-5.7.19-winx64\bin\mysqld --initialize-insecure
2019-12-25T01:59:21.234788Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2019-12-25T01:59:21.237781Z 0 [ERROR] --initialize specified but the data directory has files in it. Aborting.
2019-12-25T01:59:21.239775Z 0 [ERROR] Aborting

原因是data文件夹已经创建

解决办法:删除该目录下的data文件夹,删除后重新执行该命令该文件夹会重新生成,成功初始化

原文地址:https://www.cnblogs.com/z-x-y/p/12095838.html

时间: 2024-11-26 02:45:14

mysql报错--initialize specified but the data directory has files in it. Aborting.的相关文章

Mac下PHP连接MySQL报错"No such file or directory"的解决办法

首先做个简短的介绍. [说明1]MAC下MYSQL的安装路径: /usr/local/mysql-5.1.63-osx10.6-x86_64 数据库的数据文件在该目录的data文件夹中: 命令文件在bin文件夹中. [说明2]通过终端打开MYSQL命令行的方法: /usr/local/mysql-5.1.63-osx10.6-x86_64 好下面说一下连接MYSQL数据库时报错的解决办法. 1,首先确定是mysql_connect()和mysql_pconnect()的问题,故障现象就是函数返回

PHP连接MySQL报错"No such file or directory"的解决办法

好下面说一下连接MYSQL数据库时报错的解决办法. 1,首先确定是mysql_connect()和mysql_pconnect()的问题,故障现象就是函数返回空,而mysql_error()返回“No such file or directory” 2,写个phpinfo页面,找到mysql.default_socket.mysqli.default_socket.pdo_mysql.default_socket 3,启动mysql(见说明2),执行命令 STATUS; 记下UNIX socke

解决mysql报错Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’

启动mysql 报错: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) 1.先查看 /etc/rc.d/init.d/mysqld status 看看m y s q l 是否已经启动.另外看看是不是权限问题. 2.确定你的mysql.sock是不是在那个位置,mysql -u 你的mysql用户名 -p -S /var/lib/mysql/

连接mysql报错:error 2003 (hy000):can't connect to mysql server on 'localhost' (10061)

一.mysql 的bin目录下有个MySQLInstanceConfig.exe,运行就可以进行创建数据库实例,创建实例时也可以生成windows 服务,把服务设置成自动启动就可以了 二.安装在D盘的discuzz!打开后出现上述错误,请问应如何处理?winmysqladmin已经启动,但三色树上有一个小红点如果出现"ERROR 2003: Can't connect to MySQL server on 'localhost' (10061)",说明你的MySQL还没有启动.解决办法

mysql 报错之创建自定义函数

I experienced this error while trying to alter one of my stored procedures remotely on a master server. After some research, I ended up getting information from “Binary Logging of Stored Programs“. From MySQL Reference in verbatim:When you create a s

MySQL 报错 Last_SQL_Errno: 1032

MySQL 报错 Last_SQL_Errno: 1032 show slave status \G Last_SQL_Errno: 1032 Last_SQL_Error: Could not execute Update_rows event on table 35lq_db.dr_planstats_h; Can't find record in 'dr_planstats_h', Error_code: 1032; handler error HA_ERR_KEY_NOT_FOUND;

xtrabackup备份MySQL报错:InnoDB: Error number 24 means 'Too many open files'

xtrabackup备份MySQL报错:InnoDB: Error number 24 means 'Too many open files' 1.使用xtrabackup备份MySQL时出现如下报错: 190228 00:30:01 >> log scanned up to (88343615848) xtrabackup: Generating a list of tablespaces InnoDB: Allocated tablespace ID 2 for mysql/plugin,

mysql报错问题解决Character set 'utf8mb4' is not a compiled character set

mysql: Character set 'utf8mb4' is not a compiled character set and is not specified in the '/usr/share/mysql/charsets/Index.xml' file 报错的解决方法 1.由于日常程序使用了字符集utf8mb4,为了避免每次更新时,set names utf8mb4,就把配置文件改了,如下: 增加了mysql客户端的默认字符集设置 [[email protected]~]# vim

MySQL报错“1366 - Incorrect integer value: '' XXXXXXX' at row 1 ”

出现这个错误是因为我在表中插入了一条含有中文字符的语句: 修改方法: my.ini中查找sql-mode 将 sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION", 修改为 sql-mode="NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION", 重启mysql后即可 . MySQL报错"1366 - Incorrect int