Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Warning: The post-install step did not complete successfully, When trying to install mysql using brew in Mac OS High Sierra

Trying to install mysql5.7 with brew on Mac OS High Sierra

I have used the following commands:

sudo rm -rf /usr/local/var/mysql/
brew install [email protected]
brew postinstall [email protected]

Got the below errors

2019-10-05T02:59:24.136970Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2019-10-05T02:59:24.138997Z 0 [Warning] Setting lower_case_table_names=2 because file system for /usr/local/var/mysql/ is case insensitive
2019-10-05T02:59:24.215676Z 0 [Warning] InnoDB: New log files created, LSN=45790
2019-10-05T02:59:24.232279Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
2019-10-05T02:59:24.286214Z 0 [ERROR] unknown variable 'mysqlx-bind-address=127.0.0.1'
2019-10-05T02:59:24.286281Z 0 [ERROR] Aborting

Because of which i couldn't able to do

mysql_secure_installation

which throws

Error: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
like image 331
N20084753 Avatar asked Oct 05 '19 03:10

N20084753


2 Answers

If you are able to find your my.cnf file (for me, it was in /usr/local/etc/my.cnf) you should remove the below line:

mysqlx-bind-address = 127.0.0.1
like image 99
sbkrogers Avatar answered Oct 11 '22 08:10

sbkrogers


Like @sbkrogers says, must to remove the line, but since I use Homebrew to install [email protected]:

  1. My file is located on /opt/homebrew/etc/my.cnf. Where remove mysqlx-bind-address = 127.0.0.1

  2. After the first aborted installation, following folders need to be deleted:

  3. ...then try to install again. brew install mysql

  4. After the installation was success, restart terminal

like image 24
jgu7man Avatar answered Oct 11 '22 08:10

jgu7man