mysql报错22_MySQL报错:ERROR 2013 (HY000): Lost connection to MySQL server during query

首先贴上实验用各版本:

OS:CentOS 6.5

MySQL:

mysql> select version ();

+------------+

| version () |

+------------+

| 5.6.22     |

+------------+

1 row in set (0.00 sec)

事情是这样的:本来是要在虚机上搭建一个wordpress做实验,刚创建完数据库,就在赋权额时候发生不在计划的错误:

mysql>grant all on wordpress.* to

wordpress@localhost identified by "wp123456";

ERROR

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

查看报错日志如下:tail -fn 30 /var/log/mysqld.log

2016-11-15 12:56:22

112085 [ERROR] Missing system table mysql.proxies_priv; please run

mysql_upgrade to create it

2016-11-15 12:56:22

112085 [ERROR] Native table 'performance_schema'.'cond_instances' has the wrong

structure

2016-11-15 12:56:22

112085 [ERROR] Native table 'performance_schema'.'events_waits_current' has the

wrong structure

2016-11-15 12:56:22

112085 [ERROR] Native table 'performance_schema'.'events_waits_history' has the

wrong structure

2016-11-15 12:56:22

112085 [ERROR] Native table 'performance_schema'.'events_waits_history_long'

has the wrong structure

看报错日志一直在提示wrong

structure(结构错误),通常结构错误是由升级MySQL版本导致的,我虽然没有升级,但是在安装MySQL5.6.22前,安装的是5.1版本,可能是由于卸除的不干净(但是之前在赋权时并没有此问题,疑惑??),看了网上N多方法,但是对于我的问题就是不感冒啊!突然在网上看到一个升级脚本修复的例子,就想着我的是不是也适用(因为我之前装过旧版本),所以就试了一下果然OK啊!看到成功那一刻,一扫额头阴霾O(∩_∩)O~

执行升级脚本命令:

/usr/local/mysql/bin/mysql_upgrade -u root -p

输入密码后回车,再次赋权成功啦,哇咔咔..........

66fb8670547101e466925aaef75ca331.png

mysql>grant all on wordpress.* to wordpress@localhost identified by "wp123456";Query OK, 0 rows affected (0.00 sec)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值