0

I have entered the following command:

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

I tried to brew uninstall mysql then brew install mysql I even tried to go to the site and download it but will not start up. I am not sure what is going on. This just started to happen of a sudden.

After 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

This is me trying to stop and restart mysql in the termainal:

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

Any advice would be greatly appreciated.

Mike3355
  • 11,305
  • 24
  • 96
  • 184

1 Answers1

0

Try to use sudo to start, restart or stop it! I had this same problem same times ago. Another thing that can help you are these things:

Links to reinstall Mysql in 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/

Links if you have any problem with login:

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

Read it, who knows it can help you.

:)

Aipi
  • 2,076
  • 4
  • 18
  • 27