23

我是 sql 新手,我安装了 mysql,我正在关注这本书:Java 如何编程连接到 mysql

我收到以下错误。关于时间戳..我理解原因..但我正在尝试修复“无法创建测试文件 C:\Program Files\MySQL\MySQL Server 5.6\data\Swati-HP.lower-test”

请指导我尊重这一点

C:\Users\Swati>mysqld.exe
2013-10-15 13:57:01 0 [Warning] TIMESTAMP with implicit DEFAULT value is depreca
ted. Please use --explicit_defaults_for_timestamp server option (see documentati
on for more details).
2013-10-15 13:57:01 7492 [Warning] Can't create test file C:\Program Files\MySQL
\MySQL Server 5.6\data\Swati-HP.lower-test
2013-10-15 13:57:01 7492 [Warning] Can't create test file C:\Program Files\MySQL
\MySQL Server 5.6\data\Swati-HP.lower-test
2013-10-15 13:57:01 7492 [Note] Plugin 'FEDERATED' is disabled.
2013-10-15 13:57:01 7492 [Note] InnoDB: The InnoDB memory heap is disabled
2013-10-15 13:57:01 7492 [Note] InnoDB: Mutexes and rw_locks use Windows interlo
cked functions
2013-10-15 13:57:01 7492 [Note] InnoDB: Compressed tables use zlib 1.2.3
2013-10-15 13:57:01 7492 [Note] InnoDB: Not using CPU crc32 instructions
2013-10-15 13:57:01 7492 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2013-10-15 13:57:01 7492 [Note] InnoDB: Completed initialization of buffer pool
2013-10-15 13:57:01 7492 [ERROR] InnoDB: .\ibdata1 can't be opened in read-write
 mode
2013-10-15 13:57:01 7492 [ERROR] InnoDB: The system tablespace must be writable!

2013-10-15 13:57:01 7492 [ERROR] Plugin 'InnoDB' init function returned error.
2013-10-15 13:57:01 7492 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGIN
E failed.
2013-10-15 13:57:01 7492 [ERROR] Unknown/unsupported storage engine: InnoDB
2013-10-15 13:57:01 7492 [ERROR] Aborting

2013-10-15 13:57:01 7492 [Note] Binlog end
2013-10-15 13:57:01 7492 [Note] Shutting down plugin 'partition'
.
.
.
.
.
2013-10-15 13:57:01 7492 [Note] mysqld.exe: Shutdown complete
4

4 回答 4

94

mysqld.exe如果已经在运行,也会发生同样的错误。直接杀死进程。

于 2014-10-01T13:39:02.420 回答
13

Windows 中的文件夹“程序文件”通常限制非管理员帐户的写入,因此您可以:

  1. 在管理员帐户下运行 mysql - 不是很好的做法
  2. 为所有人设置此文件夹的写入权限 - 不是很好的做法
  3. 将数据存储移动到另一个地方并适当更改 my.cnf - 正确的
于 2013-10-15T21:15:00.780 回答
0

您需要为用户 SYSTEM 授予读/写权限

于 2015-01-28T10:38:00.193 回答
0

打开 DOS 提示符并转到 MySQL bin\ 目录并发出以下命令以了解导致问题的原因:

..\bin >mysqld --defaults-file="C:\ProgramData\MySQL\MySQL Server 8.0\my.ini" --standalone --console

于 2020-01-12T10:48:51.040 回答