我已經進入下面的命令: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
任何意見將不勝感激。