mysql - 无法在我的 Mac 上运行特定版本的 mysql
问题描述
我有两个版本的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)。
我不明白,我在这里想念什么?
解决方案
您不能在同一个数据目录上运行两个 mysql 实例。
pid 文件用于保证mysqld
同一数据库上同时只有一个进程在运行。
如果要同时运行 MySQL 5.7 和 MySQL 8,则必须定义两个不同的数据目录。
推荐阅读
- node.js - 我无法使用 node.js 将我的数组推送到 mongodb 文档
- r - 我正在尝试使用 R 改变数据框中的特定变量
- javascript - 基于泛型类型定义 TypeScript 类型
- reactjs - 反应 npm run build 失败但 run start 有效
- c - 为什么当我第一次输入不同的内容时,while 循环会重复两次而不让我第二次扫描?
- ubuntu - hcitool lescan 不适用于蓝牙版本 5
- python-3.x - 如何获取列表中所有字符的所有索引?
- database - DynamoDB 是否保证在快速更新时收敛到最新数据?
- python - 阶乘数系统算法的形式证明
- python - Keras 中单一维度的全局运算符?