2016-08-22 244 views
0
我在使用MariaDB的問題

,而這是第一次工作的罰款。我只有在無法啓動MySQL守護進程時才重新啓動服務器。這似乎仍然在使用我的舊U盤的文件路徑(/媒體/窩),而我已經切換到新的硬盤代替(/媒體/希捷)。這是我得到的/var/log/mysql/error.log錯誤:MySQL的 - 無法鎖定詠歎調控制文件

160728 9:32:32 [ERROR] mysqld: Can't lock aria control file '/media/brood/mysql/aria_log_control' for exclusive use, error: 11. Will retry for 30 seconds 
160728 9:33:03 [ERROR] mysqld: Got error 'Could not get an exclusive lock; file is probably in use by another process' when trying to use aria control file '/media/brood/mysql/aria_log_control' 
160728 9:33:03 [ERROR] Plugin 'Aria' init function returned error. 
160728 9:33:03 [ERROR] Plugin 'Aria' registration as a STORAGE ENGINE failed. 
160728 9:33:03 [Note] InnoDB: Using mutexes to ref count buffer pool pages 
160728 9:33:03 [Note] InnoDB: The InnoDB memory heap is disabled 
160728 9:33:03 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins 
160728 9:33:03 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier 
160728 9:33:03 [Note] InnoDB: Compressed tables use zlib 1.2.8 
160728 9:33:03 [Note] InnoDB: Using Linux native AIO 
160728 9:33:03 [Note] InnoDB: Not using CPU crc32 instructions 
160728 9:33:03 [Note] InnoDB: Initializing buffer pool, size = 128.0M 
160728 9:33:03 [Note] InnoDB: Completed initialization of buffer pool 
160728 9:33:03 [ERROR] InnoDB: Unable to lock ./ib_logfile0, error: 11 
160728 9:33:03 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files. 
160728 9:33:03 [ERROR] InnoDB: Unable to open './ib_logfile0' 
160728 9:33:03 [ERROR] Plugin 'InnoDB' init function returned error. 
160728 9:33:03 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. 
160728 9:33:03 [Note] Plugin 'FEEDBACK' is disabled. 
mysqld: Too many arguments (first extra is 'stop'). 
160728 9:33:03 [ERROR] Aborting 

160728 9:33:03 [Note] mysqld: Shutdown complete 

也有可能是權限問題,或者也許文件仍然鎖定(我不知道如何工作的) ,因爲上次Raspberry Pi重新啓動,這是因爲有人不小心拔出了Pi的電源插頭。

+1

你怎麼切換到新的HDD /媒體/希捷? – apesa

+0

也許在磁盤空間試圖建立它需要的臨時表。你有沒有把tmpdir設置爲一個單獨的小文件系統? –

+0

@apesa我只是從U盤到硬盤格式化新硬盤與相同的文件系統(ext4的),然後複製所有文件(文件夾htdocs目錄和mysql),並在my.cnf我這一行:'DATADIR =/media/seagate/mysql'。 –

回答

0

爲什麼日誌包含在舊版本的MySQL數據文件夾的路徑仍是一個謎給我。 (它甚至不是以前的USB棒,使故事更完整,它實際上是我之前使用的USB棒!)但是,問題解決了!答案竟是比我想象的更簡單,事實證明,我的哥哥卸載東西(玩老遊戲的模擬器,他說),當他發現它卸載MariaDB的服務器-10.0(奇怪!)。所以我做了一個簡單的sudo apt-get install mariadb-server-10.0,猜猜看!它解決了我的問題! :d

相關問題