Mac OSX Mojave。我已将$dir = "dir";
foreach ($files as $file){
$filename = $dir . $files["9"];
$handle = fopen( $filename , 'r'
}
与mysql@5.6
一起安装。我已经运行brew
。
brew link --force mysql@5.6
如果我直接从终端运行$ cat /Users/me/Library/LaunchAgents/homebrew.mxcl.mysql@5.6.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<true/>
<key>Label</key>
<string>homebrew.mxcl.mysql@5.6</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/opt/mysql@5.6/bin/mysqld_safe</string>
<string>--datadir=/usr/local/var/mysql</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>WorkingDirectory</key>
<string>/usr/local/var/mysql</string>
</dict>
</plist>
,则/usr/local/opt/mysql@5.6/bin/mysqld_safe
将启动。如果我尝试运行mysqld
,则不会运行(但brew说可以,但是在brew services restart mysql@5.6
中显示为黄色)。
这是怎么回事?
答案 0 :(得分:1)
我的brew nginx软件包存在此问题。
与sudo
一起运行对我来说很有效。
尝试运行:
sudo brew services restart mysql@5.6