2013-10-15 136 views
9

啓動MySQL服務器我是新來的SQL,我安裝了MySQL和我下面的書:Java的如何編程連接到MySQL錯誤從命令提示符

我收到以下錯誤。 關於時間戳。我明白其中的道理..但我試圖解決 「無法創建測試文件C:\ Program Files文件\的MySQL \ MySQL服務器5.6 \ DATA \姆斯瓦蒂-HP.lower測試」

請指引我機智對於這個

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 

回答

9

文件夾「程序文件」通常是在Windows限制了非管理員帳戶的寫入,所以你可以:

  1. 運行MySQL下管理員帳戶 - 不是很好習慣
  2. 套寫此文件夾的所有權利 - 不是很好的做法
  3. 移動數據存儲到另一個地方,my.cnf中適當改變 - 對一個
+0

這對我的作品+1。 –

+1

通過右鍵單擊「cmd」並選擇Run-As-Administrator – John

49

同樣的錯誤也可能發生,如果mysqld.exe已在運行。只要殺死這個過程。

+2

以管理員模式運行cmd,這對我來說是多謝! – avalancha

+0

謝謝,這很有幫助 – Alsciende

+1

+1 - 浪費了半個小時,然後找到了答案。乾杯!我對mysql很陌生。我沒有'--console'選項就啓動了db。 –

0

您需要授予讀/寫權限的用戶SYSTEM