修复mysql:[ERROR] Native table ‘performance_schema’

标签:,
来源: WordPress导航主题
日期: 2022-9-6
作者: WordPress导航主题

mysql数据库出现如下错误,主要是因为升级了mysql软件包,而一些数据库的表结构发生变化而无法正常运行。

140213 16:55:47 [ERROR] Native table ‘performance_schema’.’events_waits_current’ has the wrong structure
140213 16:55:47 [ERROR] Native table ‘performance_schema’.’events_waits_history’ has the wrong structure
140213 16:55:47 [ERROR] Native table ‘performance_schema’.’events_waits_history_long’ has the wrong structure
140213 16:55:47 [ERROR] Native table ‘performance_schema’.’setup_consumers’ has the wrong structure
140213 16:55:47 [ERROR] Native table ‘performance_schema’.’setup_instruments’ has the wrong structure
140213 16:55:47 [ERROR] Native table ‘performance_schema’.’setup_timers’ has the wrong structure
140213 16:55:47 [ERROR] Native table ‘performance_schema’.’performance_timers’ has the wrong structure
140213 16:55:47 [ERROR] Native table ‘performance_schema’.’threads’ has the wrong structure
140213 16:55:47 [ERROR] Native table ‘performance_schema’.’events_waits_summary_by_thread_by_event_name’ has the wrong structure
140213 16:55:47 [ERROR] Native table ‘performance_schema’.’events_waits_summary_by_instance’ has the wrong structure
140213 16:55:47 [ERROR] Native table ‘performance_schema’.’events_waits_summary_global_by_event_name’ has the wrong structure
140213 16:55:47 [ERROR] Native table ‘performance_schema’.’file_summary_by_event_name’ has the wrong structure
140213 16:55:47 [ERROR] Native table ‘performance_schema’.’file_summary_by_instance’ has the wrong structure
140213 16:55:47 [ERROR] Native table ‘performance_schema’.’mutex_instances’ has the wrong structure
140213 16:55:47 [ERROR] Native table ‘performance_schema’.’rwlock_instances’ has the wrong structure
140213 16:55:47 [ERROR] Native table ‘performance_schema’.’cond_instances’ has the wrong structure
140213 16:55:47 [ERROR] Native table ‘performance_schema’.’file_instances’ has the wrong structure

修复方法很简单只需在root权限下运行如下命令即可:

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

输入命令后会要求验证mysql密码,填入密码后确认如下图所示即表示修复完毕:

修复mysql:[ERROR] Native table ‘performance_schema’

腾讯云限时秒杀【点击购买】

搬瓦工,CN2高速线路,1GB带宽,电信联通优化KVM,延迟低,速度快,建站稳定,搬瓦工BandwagonHost VPS优惠码BWH26FXH3HIQ,支持<支付宝> 【点击购买】!

Vultr$3.5日本节点,512M内存/500G流量/1G带宽,电信联通优化,延迟低,速度快【点击购买】!

阿里云香港、新加坡VPS/1核/1G/25G SSD/1T流量/30M带宽/年付¥288【点击购买】

修复mysql:[ERROR] Native table ‘performance_schema’

`微信`扫码 加好友

链接到文章: https://gkxyz.com/xiufumysqlerror-native-table-performance_schema.html

推荐站点

评论已关闭