Valet-plus: Brew was unable to install [mysql]

Created on 21 Jun 2018  ·  7Comments  ·  Source: weprovide/valet-plus

Hi I have just installed the latest version and I am getting this

==> Downloading https://homebrew.bintray.com/bottles/mysql-8.0.11.high_sierra.bottle.tar.gz
Already downloaded: /Users/jporter/Library/Caches/Homebrew/mysql-8.0.11.high_sierra.bottle.tar.gz
==> Pouring mysql-8.0.11.high_sierra.bottle.tar.gz
==> /usr/local/Cellar/mysql/8.0.11/bin/mysqld --initialize-insecure --user=jporter --basedir=/usr/local/Cellar/mysql/8.0.11 --datadir=/usr/local/var/mysql --tmpdir=/tmp
Last 15 lines from /Users/jporter/Library/Logs/Homebrew/mysql/post_install.01.mysqld:
2018-06-21 16:02:12 +0200

/usr/local/Cellar/mysql/8.0.11/bin/mysqld
--initialize-insecure
--user=jporter
--basedir=/usr/local/Cellar/mysql/8.0.11
--datadir=/usr/local/var/mysql
--tmpdir=/tmp

2018-06-21T14:02:12.644001Z 0 [System] [MY-013169] [Server] /usr/local/Cellar/mysql/8.0.11/bin/mysqld (mysqld 8.0.11) initializing of server in progress as process 49119
2018-06-21T14:02:12.649556Z 0 [ERROR] [MY-010457] [Server] --initialize specified but the data directory has files in it. Aborting.
2018-06-21T14:02:12.649609Z 0 [ERROR] [MY-010119] [Server] Aborting
2018-06-21T14:02:12.649834Z 0 [System] [MY-010910] [Server] /usr/local/Cellar/mysql/8.0.11/bin/mysqld: Shutdown complete (mysqld 8.0.11) Homebrew.
Warning: The post-install step did not complete successfully
You can try again using brew postinstall mysql
==> Caveats
We've installed your MySQL database without a root password. To secure it run:
mysql_secure_installation

MySQL is configured to only allow connections from localhost by default

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/8.0.11: 254 files, 232.6MB

In Brew.php line 134:

Brew was unable to install [mysql].

After, mysql not working

~|⇒ mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (38)

Thanks already

Most helpful comment

I resolved this problem. That was simple. I just needed to run command:
brew services start [email protected]

Maybe it will help someone.

All 7 comments

Hey there, I will have to look into MySQL 8 installing itself since that should be fixed. However the /tmp/mysql.sock not being found is due to MySQL not being able to start itself. I've mentioned the workaround in https://github.com/weprovide/valet-plus/issues/197#issuecomment-398707752.

@juporag Are you on version 1.0.18?

Yes, version is 1.0.18

Thanks!

With

~|⇒ mysql --version
mysql Ver 14.14 Distrib 5.7.22, for osx10.13 (x86_64) using EditLine wrapper

It`s fine!

Closing this ticket as it sounds like you managed to solve your issue. If you are still encountering problems, please let us know by opening a new ticket!

I have the same issue. Mac OS El Capitan.
What I did:
1) Reinstall brew, node (for some reason my system needed it)
2) Install [email protected] and [email protected]
3) Reinstall valet with brew.
4) Install mysql with brew.
5) valet fix
6) Check path in .bash_profile - it's like in manual (export PATH="/usr/local/opt/[email protected]/bin:$PATH")
7) After i run commands mysql or mysql -v I get this error:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
8) I checked that my bash_profile has line:
export PATH="/usr/local/opt/[email protected]/bin:$PATH"
and I checked that path with "which mysql"

Can anyone tell me what else can I do for diagnostic of this problem.

I resolved this problem. That was simple. I just needed to run command:
brew services start [email protected]

Maybe it will help someone.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

guarinogabriel picture guarinogabriel  ·  4Comments

Igloczek picture Igloczek  ·  4Comments

MikeYV picture MikeYV  ·  4Comments

rdorck picture rdorck  ·  3Comments

eclectic-coding picture eclectic-coding  ·  4Comments