我是新來的論壇,但我希望能夠變得更加活躍,因爲我最近購買了一臺專用服務器,並且正在運行Fedora,所以這是一個不斷學習的過程,在BASH中相當平均,但我足夠了解我的方式,我是一個軟件開發人員,不僅僅是交易網絡techi。這導致我最初的問題,我重新啓動我的dedi後開始我的MySQL守護進程的問題,我不知道爲什麼突然這樣做,我從服務器運行PHPMyAdmin,還通過CLI發出某些命令MySQL,但是在重新啓動我得到這個錯誤後,每次我嘗試啓動守護進程的實例:啓動MySQL Daemon時出現問題
[[email protected] ~]# service mysqld start
Redirecting to /bin/systemctl start mysqld.service
[[email protected] ~]# systemctl mysqld start
Unknown operation mysqld
[[email protected] ~]# systemctl start mysqld
Failed to issue method call: Unit name mysqld is not valid.
[[email protected] ~]# systemctl start mysqld.service
[[email protected] ~]# mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/path/to/mysql.sock' (2)
它完全是怪異,因爲它是完美的工作之前,我重新啓動它,我沒有更新或更改安裝,我做的唯一的事情是安裝postfix,但我不明白爲什麼這會導致與MySQL的任何問題:S
我真的需要在這一個手,我已經嘗試了幾個解決方案谷歌沒有無論結果如何。先謝謝你們。
~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
更新1:
好了,所以我找到了目錄mysqld正在舉行,這是 '在/ usr/libexec目錄/ mysqld的',我輸入這個目錄中 './mysqld開始',並指定該輸出:
120729 1:49:09 [Warning] The syntax '--log-slow-queries' is deprecated and will be removed in a future release. Please use '--slow-query-log'/'--slow-query-log-file' instead.
120729 1:49:09 [Warning] The syntax '--log-slow-queries' is deprecated and will be removed in a future release. Please use '--slow-query-log'/'--slow-query-log-file' instead.
120729 1:49:09 [Warning] Can't create test file /run/mysql/ks23085.lower-test
120729 1:49:09 [Warning] Can't create test file /run/mysql/ks23085.lower-test
./mysqld: Can't change dir to '/run/mysql/' (Errcode: 2)
120729 1:49:09 [ERROR] Aborting
120729 1:49:09 [Note] ./mysqld: Shutdown complete
~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~ 更新2:
我設法通過在所有我的舊數據庫的'run /'中創建'mysql'目錄來傳遞目錄問題,但是現在我似乎得到了一個似乎並不容易解決的錯誤:/
下面是輸出:
120729 2:15:59 [Warning] The syntax '--log-slow-queries' is deprecated and will be removed in a future release. Please use '--slow-query-log'/'--slow-query-log-file' instead.
120729 2:15:59 [Warning] The syntax '--log-slow-queries' is deprecated and will be removed in a future release. Please use '--slow-query-log'/'--slow-query-log-file' instead.
120729 2:15:59 [Warning] Can't create test file /run/mysql/ks23085.lower-test
120729 2:15:59 [Warning] Can't create test file /run/mysql/ks23085.lower-test
120729 2:15:59 [Note] Plugin 'FEDERATED' is disabled.
120729 2:15:59 [Note] Plugin 'InnoDB' is disabled.
mysqld: Can't find file: './mysql/plugin.frm' (errno: 13)
120729 2:15:59 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
120729 2:15:59 [ERROR] mysqld: unknown option '--skip-locking'
120729 2:15:59 [ERROR] Aborting
120729 2:15:59 [Note] mysqld: Shutdown complete
Mysqld可能無法啓動。進入mysql安裝文件夾並從那裏運行mysqld守護進程(不作爲服務),因此它會打印日誌,並將其粘貼到此處。 – Jimmy 2012-07-28 17:11:11
fedora上的mysql安裝文件夾在哪裏?因爲我似乎無法在/ etc/mysql /任何想法中找到mydql守護進程? – 2012-07-28 18:11:34
執行rpm -ql mysqld。這會給你包myslqd的列表。如果你的軟件包被稱爲myslq-server- <版本號>或其他 - 請使用該名稱。只有當你通過軟件包管理器安裝了軟件包時, – hovanessyan 2012-07-28 18:18:57