mysql 突然不行了 不想重新装 为什么要检查C:\Program Files\MySQL\MySQL Server 5.7\data\
C:\ProgramFiles\MySQL\MySQLServer5.7\bin>mysqld-consolemysqld:Can'tchangedirto'C:\Pro...
C:\Program Files\MySQL\MySQL Server 5.7\bin>mysqld -console
mysqld: Can't change dir to 'C:\Program Files\MySQL\MySQL Server 5.7\data\' (Errcode: 2 - No such file or directory)
2016-11-02T05:02:55.239589Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2016-11-02T05:02:55.239589Z 0 [Warning] Insecure configuration for --secure-file-priv: Current value does not restrict location of generated files. Consider setting it to a valid, non-empty path.
2016-11-02T05:02:55.249589Z 0 [Note] mysqld (mysqld 5.7.9) starting as process 3896 ...
2016-11-02T05:02:55.249589Z 0 [Warning] Can't create test file C:\Program Files\MySQL\MySQL Server 5.7\data\Mr_Xu-PC.lower-test
2016-11-02T05:02:55.249589Z 0 [Warning] Can't create test file C:\Program Files\MySQL\MySQL Server 5.7\data\Mr_Xu-PC.lower-test
2016-11-02T05:02:55.249589Z 0 [ERROR] failed to set datadir to C:\Program Files\MySQL\MySQL Server 5.7\data\
2016-11-02T05:02:55.249589Z 0 [ERROR] Aborting
2016-11-02T05:02:55.249589Z 0 [Note] Binlog end
2016-11-02T05:02:55.249589Z 0 [Note] mysqld: Shutdown complete
我my.ini配置的是 C:\ProgramData\MySQL\MySQL Server 5.7\Data 展开
mysqld: Can't change dir to 'C:\Program Files\MySQL\MySQL Server 5.7\data\' (Errcode: 2 - No such file or directory)
2016-11-02T05:02:55.239589Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2016-11-02T05:02:55.239589Z 0 [Warning] Insecure configuration for --secure-file-priv: Current value does not restrict location of generated files. Consider setting it to a valid, non-empty path.
2016-11-02T05:02:55.249589Z 0 [Note] mysqld (mysqld 5.7.9) starting as process 3896 ...
2016-11-02T05:02:55.249589Z 0 [Warning] Can't create test file C:\Program Files\MySQL\MySQL Server 5.7\data\Mr_Xu-PC.lower-test
2016-11-02T05:02:55.249589Z 0 [Warning] Can't create test file C:\Program Files\MySQL\MySQL Server 5.7\data\Mr_Xu-PC.lower-test
2016-11-02T05:02:55.249589Z 0 [ERROR] failed to set datadir to C:\Program Files\MySQL\MySQL Server 5.7\data\
2016-11-02T05:02:55.249589Z 0 [ERROR] Aborting
2016-11-02T05:02:55.249589Z 0 [Note] Binlog end
2016-11-02T05:02:55.249589Z 0 [Note] mysqld: Shutdown complete
我my.ini配置的是 C:\ProgramData\MySQL\MySQL Server 5.7\Data 展开
4个回答
展开全部
即使在 mysql 正常运行的时候,执行 mysqld -console 命令,一样出这样的东西出来。我也是遇到了类似的问题,也是被这个 mysqld -console 命令误导。后来是仔细检查了 my.ini 里面定义的 log-error 记录,就是你定义的 Data 目录下的一个 .err 文件,发现是我误删除了 log-bin 的记录文件,而数据库在机器重启的时候有点点异常,然后数据库在重启的时候,去找这个 bin_log 来尝试恢复,找不到这个二进制记录文件以后,就拒绝启动了。我只好关闭了数据库的 # Binary Logging. ,这样数据库就能启动了。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
将my.ini复制的C盘根目录就可以了。要不就在--defaults-file里指定一下
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
追问
我看了类似的帖子,但我这个本来就有Data文件,只是不在它去找的那个地方,昨天还好好的,今天就莫名其妙的到C:\Program Files\MySQL\MySQL Server 5.7\data\
里找了
追答
那就是这个路径的问题了,看看哪里可以改,或者你移到他指定的目录下,先把问题解决
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询