[英]Mysql 5.6 is not working in Mac OS
Mysql 5.6在Mac OSX中不断产生问题。
它不断断开服务器连接。
并抛出诸如/tmp/mysql.sock
类的某些错误,
与通过DMG安装的Mysql 5.6.14相同: $ mysql ERROR 2013 (HY000): Lost connection to MySQL server at 'sending authentication information', system error: 32
并且authentication packet lost
错误。
我必须每次都杀死进程ID,然后不得不再次运行mysql -u root -p
。
但是同样的事情一次又一次地发生。
即使任何网站上的在线答案都不起作用,也不必担心。 试试这个,它对我和我所有的队友都像魅力一样奏效。
1)。 在Mac中安装Atom。
2)。 运行sudo atom /Library/LaunchDaemons/com.oracle.oss.mysql.mysqld.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>Disabled</key>
<false/>
<key>ExitTimeOut</key>
<integer>600</integer>
<key>GroupName</key>
<string>_mysql</string>
<key>KeepAlive</key>
<true/>
<key>Label</key>
<string>com.oracle.oss.mysql.mysqld</string>
<key>LaunchOnlyOnce</key>
<false/>
<key>ProcessType</key>
<string>Interactive</string>
<key>Program</key>
<string>/usr/local/mysql/bin/mysqld</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/mysql/bin/mysqld</string>
<string>--user=_mysql</string>
<string>--basedir=/usr/local/mysql</string>
<string>--datadir=/usr/local/mysql/data</string>
<string>--plugin-dir=/usr/local/mysql/lib/plugin</string>
<string>--log-error=/usr/local/mysql/data/mysqld.local.err</string>
<string>--pid-file=/usr/local/mysql/data/mysqld.local.pid</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>SessionCreate</key>
<true/>
<key>UserName</key>
<string>_mysql</string>
<key>WorkingDirectory</key>
<string>/usr/local/mysql</string>
</dict>
</plist>
然后在</array>
上方添加这两行
<string>--port=3306</string>
<string>--innodb_file_per_table=0</string>
然后重启mysql服务器。 而已。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.