OS X 10.8.2 上的 MySQL 5.6 在创建用户时断开连接?

xre*_*ref 5 mysql

通过 Homebrew 我刚刚从 MySQL 5.5.29 升级到 5.6.10,我的所有查询和现有用户都运行良好,但是每当我尝试修改权限或创建用户时,MySQL 都会断开我的连接。有没有我需要为 5.6 更改 my.cnf 设置,或者我需要做的系统表更新等?

mysql> create user 'something'@'localhost' identified by 'password';
ERROR 2013 (HY000): Lost connection to MySQL server during query

mysql> create user 'something'@'localhost' identified by 'password';
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
Connection id:    1
Current database: *** NONE ***

ERROR 2013 (HY000): Lost connection to MySQL server during query

mysql> SHOW VARIABLES LIKE "%version%";
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
Connection id:    1
Current database: *** NONE ***

+-------------------------+---------------------+
| Variable_name           | Value               |
+-------------------------+---------------------+
| innodb_version          | 1.2.10              |
| protocol_version        | 10                  |
| slave_type_conversions  |                     |
| version                 | 5.6.10              |
| version_comment         | Source distribution |
| version_compile_machine | x86_64              |
| version_compile_os      | osx10.8             |
+-------------------------+---------------------+
7 rows in set (0.00 sec)
Run Code Online (Sandbox Code Playgroud)

xre*_*ref 12

好吧,另一个“阅读你该死的日志”的例子:)

tail /usr/local/var/mysql/username.local.err告诉我:

2013-02-25 11:29:50 1616 [ERROR] Native table 'performance_schema'.'accounts' has the wrong structure
2013-02-25 11:29:50 1616 [ERROR] Native table 'performance_schema'.'hosts' has the wrong structure
2013-02-25 11:29:50 1616 [ERROR] Native table 'performance_schema'.'socket_instances' has the wrong structure
2013-02-25 11:29:50 1616 [ERROR] Native table 'performance_schema'.'socket_summary_by_instance' has the wrong structure
...
Run Code Online (Sandbox Code Playgroud)

所以一个快速的谷歌找到了答案:sudo mysql_upgrade -u root -ppass