设为首页 加入收藏

TOP

MySQL报错:ERROR 2013 (HY000): Lost connection to MySQL server during query
2017-10-30 06:07:10 】 浏览:81
Tags:MySQL 报错 ERROR 2013 HY000 Lost connection server during query

事情是这样的:本来是要在虚机上搭建一个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
2017-10-25 12:56:22 112085 [ERROR] Missing system table mysql.proxies_priv; please run mysql_upgrade to create it
2017-10-25 12:56:22 112085 [ERROR] Native table 'performance_schema'.'cond_instances' has the wrong structure
2017-10-25 12:56:22 112085 [ERROR] Native table 'performance_schema'.'events_waits_current' has the wrong structure
2017-10-25 12:56:22 112085 [ERROR] Native table 'performance_schema'.'events_waits_history' has the wrong structure
2017-10-25 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


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



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


】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇Oracle 12C ADG删除PDB 下一篇Oracle 表连接特有写法与标准写法

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目