Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Every time I try and add a permission I get the following error:

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

This happens using mysql in the terminal and through PhpMyAdmin

The user doing the change is root with all permissions and GRANT option. Does not matter what I set the permissions to either, all, with grant, without grant, just select. they all just have this error.

Any ideas why?

Extra info:

recently upgraded from 5.0.1 -> 5.6

I have restarted mysql

I have tried flushing privileges

# mysql --version
mysql  Ver 14.14 Distrib 5.6.19, for Linux (x86_64) using  EditLine wrapper

mysql> select current_user();
+----------------+
| current_user() |
+----------------+
| root@localhost |
+----------------+
1 row in set (0.00 sec)

mysql> select user();
+----------------+
| user()         |
+----------------+
| root@localhost |
+----------------+
1 row in set (0.00 sec)

mysql>  SELECT host,user,password,Grant_priv,Super_priv FROM mysql.user;
+---------------------------+------------------+-------------------------------------------+------------+------------+
| host                      | user             | password                                  | Grant_priv | Super_priv |
+---------------------------+------------------+-------------------------------------------+------------+------------+
| localhost                 | root             | *hash                                     | Y          | Y          |
| localhost                 | debian-sys-maint | *hash                                     | Y          | Y          |
...trim...
+---------------------------+------------------+-------------------------------------------+------------+------------+
15 rows in set (0.00 sec)
share|improve this question

2 Answers 2

Try mysql_fix_privilege_tables - upgrade MySQL system tables.

share|improve this answer
up vote 0 down vote accepted

Turns out yum did not update the db,

2014-07-14 14:49:27 2135 [ERROR] Native table 'performance_schema'.'events_statements_history' has the wrong structure
2014-07-14 14:49:27 2135 [ERROR] Native table 'performance_schema'.'events_statements_history_long' has the wrong structure
2014-07-14 14:49:27 2135 [ERROR] Native table 'performance_schema'.'events_statements_summary_by_thread_by_event_name' has the wrong structure
2014-07-14 14:49:27 2135 [ERROR] Native table 'performance_schema'.'events_statements_summary_by_account_by_event_name' has the wrong structure
2014-07-14 14:49:27 2135 [ERROR] Native table 'performance_schema'.'events_statements_summary_by_user_by_event_name' has the wrong structure
2014-07-14 14:49:27 2135 [ERROR] Native table 'performance_schema'.'events_statements_summary_by_host_by_event_name' has the wrong structure
2014-07-14 14:49:27 2135 [ERROR] Native table 'performance_schema'.'events_statements_summary_global_by_event_name' has the wrong structure

running mysql_update -u root -p<pw> sorts it out

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.