从命令提示符启动mySql服务器时出错

时间:2013-10-15 21:12:27

标签: mysql

我是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 个答案:

答案 0 :(得分:71)

如果mysqld.exe已在运行,也会发生同样的错误。只是杀了这个过程。

答案 1 :(得分:11)

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

  1. 在管理员帐户下运行mysql - 不是很好的练习
  2. 为所有人设置此文件夹的写权限 - 不是很好的练习
  3. 将数据存储移动到另一个地方并适当地更改my.cnf - 右键一个

答案 2 :(得分:0)

您需要为用户SYSTEM

授予读/写权限

答案 3 :(得分:0)

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

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