HiveBrain v1.2.0
Get Started
← Back to all entries
patternsqlModerate

MySQL 5.6 on OS X 10.8.2 disconnects on user creation?

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
disconnectsusermysqlcreation

Problem

Via Homebrew I just upgraded from MySQL 5.5.29 to 5.6.10 and all my queries and existing users are working fine, but whenever I try to modify permissions or create users now MySQL disconnects me. Are there any my.cnf settings I need to change for 5.6, or system table updates I need to do etc?

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)

Solution

Alright another instance of "read your damn logs" :)

tail /usr/local/var/mysql/username.local.err told me:

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
...


So a quick google turned up the answer: sudo mysql_upgrade -u root -ppass

Code Snippets

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
...

Context

StackExchange Database Administrators Q#35394, answer score: 12

Revisions (0)

No revisions yet.