2017-01-16 64 views
0

我已經進入下面的命令:mysql錯誤!服務器退出而不更新PID文件,釀造安裝

ps -ef | grep mysql 
    501 78808  1 0 11:45AM ??   0:00.03 /bin/sh /usr/local/opt/mysql/bin/mysqld_safe --bind-address=127.0.0.1 --datadir=/usr/local/var/mysql 
    501 78904 78808 0 11:45AM ??   0:00.51 /usr/local/Cellar/mysql/5.7.17/bin/mysqld --basedir=/usr/local/Cellar/mysql/5.7.17 --datadir=/usr/local/var/mysql --plugin-dir=/usr/local/Cellar/mysql/5.7.17/lib/plugin --bind-address=127.0.0.1 --log-error=/usr/local/var/mysql/DrewJocham.err --pid-file=/usr/local/var/mysql/DrewJocham.pid 
    501 79182 31676 0 11:49AM ttys006 0:00.00 grep mysql 

我試圖brew uninstall mysql然後brew install mysql我甚至試着去網站和下載它,但無法啓動。我不確定發生了什麼事。這剛剛開始突然發生。

brew install mysql

DrewJocham:~ DrewJocham$ brew install mysql 
==> Downloading https://homebrew.bintray.com/bottles/mysql-5.7.17.sierra.bottle.tar.gz 
Already downloaded: /Users/DrewJocham/Library/Caches/Homebrew/mysql-5.7.17.sierra.bottle.tar.gz 
==> Pouring mysql-5.7.17.sierra.bottle.tar.gz 
==> Using the sandbox 
==> Caveats 
We've installed your MySQL database without a root password. To secure it run: 
    mysql_secure_installation 

To connect run: 
    mysql -uroot 

To have launchd start mysql now and restart at login: 
    brew services start mysql 
Or, if you don't want/need a background service you can just run: 
    mysql.server start 
==> Summary 
    /usr/local/Cellar/mysql/5.7.17: 14,226 files, 444.4M 

這是我試圖在termainal停止和重啓MySQL:

DrewJocham:~ DrewJocham$ mysql.server stop 
Shutting down MySQL 
.. SUCCESS! 
DrewJocham:~ DrewJocham$ mysql.server start 
Starting MySQL 
SUCCESS! 
DrewJocham:~ DrewJocham$ usage: grep [-abcDEFGHhIiJLlmnOoqRSsUVvwxZ] [-A num] [-B num] [-C[num]] 
    [-e pattern] [-f file] [--binary-files=value] [--color=when] 
    [--context[=num]] [--directories=action] [--label] [--line-buffered] 
    [--null] [pattern] [file ...] 
2017-01-16T16:53:14.6NZ mysqld_safe A mysqld process already exists 

任何意見將不勝感激。

回答

0

嘗試使用sudo來啓動,重新啓動或停止它!同一時間我有同樣的問題。它可以幫助你的另一件事是這些東西:

鏈接重新安裝在mysql的MacOS:

https://coderwall.com/p/os6woq/uninstall-all-those-broken-versions-of-mysql-and-re-install-it-with-brew-on-mac-mavericks

https://blog.joefallon.net/2013/10/install-mysql-on-mac-osx-using-homebrew/

鏈接,如果您有與登錄任何問題:

MySQL ERROR 1045 (28000): Access denied for user 'bill'@'localhost' (using password: YES)

閱讀它,誰知道它可以幫助你。

:)

相關問題