繁体   English   中英

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

[英]Error in Starting mySql server from command prompt

我是 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

如果mysqld.exe已经在运行,也会发生同样的错误。 杀掉进程就好了。

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

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

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

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

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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM