我有两个版本的mysql:
~ » brew info mysql nirohayon@Nirs-MBP-2
mysql: stable 8.0.12 (bottled)
Open source relational database management system
https://dev.mysql.com/doc/refman/8.0/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_1 (323 files, 234.8MB) *
Poured from bottle on 2018-01-09 at 16:39:57
/usr/local/Cellar/mysql/8.0.11 (254 files, 232.6MB)
Poured from bottle on 2018-12-26 at 20:33:05
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/mysql.rb
==> Dependencies
Build: cmake ✘
Required: openssl ✔
==> Requirements
Required: macOS >= 10.10 ✔
==> Caveats
当我切换到5.7.20_1
时-我全力以赴mysql.server start
,然后mysql
打开外壳。
当我切换到8.0.11
时-我去mysql.server start
时遇到错误:
...错误!服务器退出而不更新PID文件 (/usr/local/var/mysql/My-MBP-2.pid)。
我不明白,我在这里想念什么?
答案 0 :(得分:0)
您不能在同一数据目录上运行mysql的两个实例。
该pid文件用于确保同一数据库上仅同时运行一个mysqld
进程。
如果要同时运行MySQL 5.7和MySQL 8,则必须定义两个不同的数据目录。