mysql.sockが消えた。
MacをHigh Sierraにアップデートしたところ、/tmp
の下にあったmysql.sock
が消えてしまいました。
アンインストールして再インストールしたら直るかと思いましたが、sockファイルが生成されません。
そのためにmysqlが使えないのですが、どうしたら良いでしょうか。
追記
home brew
が悪さしているのかもしれないです。brew info mysql
で以下のエラーが出ました。
mysql: stable 5.7.20 (bottled), devel 8.0.3-rc
Open source relational database management system
https://dev.mysql.com/doc/refman/5.7/en/
Conflicts with:
mariadb (because mysql, mariadb, and percona install the same binaries.)
mariadb-connector-c (because both install plugins)
mysql-cluster (because mysql, mariadb, and percona install the same binaries.)
mysql-connector-c (because both install MySQL client libraries)
percona-server (because mysql, mariadb, and percona install the same binaries.)
/usr/local/Cellar/mysql/5.7.20 (324 files, 233.7MB) *
Poured from bottle on 2017-11-25 at 09:34:57
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/mysql.rb
==> Dependencies
Build: cmake ✘
Required: openssl ✔
==> Requirements
Required: macOS >= 10.7 ✔
==> Options
--with-archive-storage-engine
Compile with the ARCHIVE storage engine enabled
--with-blackhole-storage-engine
Compile with the BLACKHOLE storage engine enabled
--with-debug
Build with debug support
--with-embedded
Build the embedded server
--with-local-infile
Build with local infile loading support
--with-test
Build with unit tests
--devel
Install development version 8.0.3-rc
==> 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