簡體   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