Brew postinstall mysql@5.7 complaining about data directory not empty when it is empty

戏子无情 提交于 2019-12-25 01:14:16

问题


Having a lot of trouble installing mysql 5.7 on Mac Mojave, (ran 'brew install mysql@5.7')

on initial install, got msg saying postinstall was not completed successfully (please see msg below).

So, after I delete everything in the directory /usr/local/var/mysql (which mysql says is not empty), I STILL get same message when re-running postinstall command ... (which is quite annoying seems MySQL is populating the data dir then complaining it is not empty?!)

[08:02:48][~/tmp]#brew postinstall mysql@5.7
==> Postinstalling mysql@5.7
==> /usr/local/Cellar/mysql@5.7/5.7.28/bin/mysqld --initialize-insecure --user=gert --basedir=/usr/local/Cellar/mysql@5.7/5.7.28 --datadir=/usr/local/var/my  Last 15 lines from /Users/gert/Library/Logs/Homebrew/mysql@5.7/post_install.01.mysqld: 2019-12-09 08:03:39 +0200

/usr/local/Cellar/mysql@5.7/5.7.28/bin/mysqld
--initialize-insecure
--user=gert
--basedir=/usr/local/Cellar/mysql@5.7/5.7.28
--datadir=/usr/local/var/mysql
--tmpdir=/tmp

2019-12-09T06:03:39.151987Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use
--explicit_defaults_for_timestamp server option (see documentation for more details). 2019-12-09T06:03:39.154025Z 0 

[ERROR] --initialize specified but the data directory has files in it. Aborting. 2019-12-09T06:03:39.154074Z 0 [ERROR] Aborting

Trying to start mysql as root gives error:

[08:04:41][~/tmp]#sudo /usr/local/opt/mysql@5.7/bin/mysql.server start Password: Starting MySQL ..... ERROR! The server quit without updating PID file (/var/run/mysqld/mysqld.pid).

Banging head against wall for days now trying to follow StackOverflow posts MySql server startup error 'The server quit without updating PID file ', none of which is working ...

My my.cnf:

[mysqld]
# Only allow connections from localhost
#bind-address = 127.0.0.1
#SO posts said to comment out the above ...

pid-file    = /var/run/mysqld/mysqld.pid  #Checked, this folder + file exists, with write permissions

来源:https://stackoverflow.com/questions/59243466/brew-postinstall-mysql5-7-complaining-about-data-directory-not-empty-when-it-is

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!