使用 Big Sur 和外部硬盘驱动器安装自制程序时更改 mysql 数据库位置
Change mysql db location when installed with homebrew using Big Sur and external hard drive
之前我有 /usr/local/var/mysql
符号链接到 /Volumes/External/mysql
意味着我所有的数据库都存储在外部硬盘上。
我不得不重新格式化我的机器并升级到 BigSur。如果我尝试像以前一样设置符号链接,我现在在尝试启动时会得到以下信息 MySQL
brew services start mysql
Bootstrap failed: 5: Input/output error
Error: Failure while executing; `/bin/launchctl bootstrap gui/502 /Users/jamie/Library/LaunchAgents/homebrew.mxcl.mysql.plist` exited with 5.
如果我也尝试更改
中的 -datadir
/usr/local/Cellar/mysql/8.0.26/homebrew.mxcl.mysql.plist
成为
<string>--datadir=/Volumes/External/mysql</string>
我得到同样的错误
brew services start mysql
Bootstrap failed: 5: Input/output error
Error: Failure while executing; `/bin/launchctl bootstrap gui/502 /Users/jamie/Library/LaunchAgents/homebrew.mxcl.mysql.plist` exited with 5.
我试过了
launchctl unload /Users/jamie/Library/LaunchAgents/homebrew.mxcl.mysql.plist
launchctl load /Users/jamie/Library/LaunchAgents/homebrew.mxcl.mysql.plist
但这也没有用。就像它没有正确的权限一样。查看隐私设置,您可以看到也由 brew 安装的 httpd 允许查看“可移动卷”。
我无法添加 MySQL,因为 + 符号是灰色的,即使我已经解锁了面板
外部硬盘驱动器位于 /Volumes/External/
并且是 APFS(加密)卷。
如有任何帮助,我们将不胜感激
https://github.com/Homebrew/discussions/discussions/2092#discussioncomment-1286031
Select 系统偏好设置->安全与隐私->全盘访问
单击锁定以进行更改
点击“+”
按 'cmd + Shift + .' 显示隐藏文件
select/bin/sh
之前我有 /usr/local/var/mysql
符号链接到 /Volumes/External/mysql
意味着我所有的数据库都存储在外部硬盘上。
我不得不重新格式化我的机器并升级到 BigSur。如果我尝试像以前一样设置符号链接,我现在在尝试启动时会得到以下信息 MySQL
brew services start mysql
Bootstrap failed: 5: Input/output error
Error: Failure while executing; `/bin/launchctl bootstrap gui/502 /Users/jamie/Library/LaunchAgents/homebrew.mxcl.mysql.plist` exited with 5.
如果我也尝试更改
中的-datadir
/usr/local/Cellar/mysql/8.0.26/homebrew.mxcl.mysql.plist
成为
<string>--datadir=/Volumes/External/mysql</string>
我得到同样的错误
brew services start mysql
Bootstrap failed: 5: Input/output error
Error: Failure while executing; `/bin/launchctl bootstrap gui/502 /Users/jamie/Library/LaunchAgents/homebrew.mxcl.mysql.plist` exited with 5.
我试过了
launchctl unload /Users/jamie/Library/LaunchAgents/homebrew.mxcl.mysql.plist
launchctl load /Users/jamie/Library/LaunchAgents/homebrew.mxcl.mysql.plist
但这也没有用。就像它没有正确的权限一样。查看隐私设置,您可以看到也由 brew 安装的 httpd 允许查看“可移动卷”。
我无法添加 MySQL,因为 + 符号是灰色的,即使我已经解锁了面板
外部硬盘驱动器位于 /Volumes/External/
并且是 APFS(加密)卷。
如有任何帮助,我们将不胜感激
https://github.com/Homebrew/discussions/discussions/2092#discussioncomment-1286031
Select 系统偏好设置->安全与隐私->全盘访问 单击锁定以进行更改 点击“+” 按 'cmd + Shift + .' 显示隐藏文件 select/bin/sh