zoukankan      html  css  js  c++  java
  • ERROR 1682 (HY000)

    ERROR 1682 (HY000)

    xtrabackup 恢复数据库后,出现1682错:

    root@localhost [(none)]>show global variables like '%conn%';
    ERROR 1682 (HY000): Native table 'performance_schema'.'global_variables' has the wrong structure
    

    解决办法:

    [root@db210_21:51:17 /root]  
    #/usr/local/mysql57/bin/mysql_upgrade -S /3101/tmp/mysql.sock
    Checking if update is needed.
    Checking server version.
    Running queries to upgrade MySQL server.
    Checking system database.
    mysql.columns_priv                                 OK
    mysql.db                                           OK
    mysql.engine_cost                                  OK
    mysql.event                                        OK
    mysql.func                                         OK
    mysql.general_log                                  OK
    mysql.gtid_executed                                OK
    mysql.help_category                                OK
    mysql.help_keyword                                 OK
    mysql.help_relation                                OK
    mysql.help_topic                                   OK
    mysql.innodb_index_stats                           OK
    mysql.innodb_table_stats                           OK
    mysql.ndb_binlog_index                             OK
    mysql.plugin                                       OK
    mysql.proc                                         OK
    mysql.procs_priv                                   OK
    mysql.proxies_priv                                 OK
    mysql.server_cost                                  OK
    mysql.servers                                      OK
    mysql.slave_master_info                            OK
    mysql.slave_relay_log_info                         OK
    mysql.slave_worker_info                            OK
    mysql.slow_log                                     OK
    mysql.tables_priv                                  OK
    mysql.time_zone                                    OK
    mysql.time_zone_leap_second                        OK
    mysql.time_zone_name                               OK
    mysql.time_zone_transition                         OK
    mysql.time_zone_transition_type                    OK
    mysql.user                                         OK
    The sys schema is already up to date (version 1.5.1).
    Checking databases.
    sys.sys_config                                     OK
    sysbench.sbtest1                                   OK
    sysbench.sbtest10                                  OK
    sysbench.sbtest11                                  OK
    sysbench.sbtest12                                  OK
    sysbench.sbtest13                                  OK
    sysbench.sbtest14                                  OK
    sysbench.sbtest15                                  OK
    sysbench.sbtest16                                  OK
    sysbench.sbtest17                                  OK
    sysbench.sbtest18                                  OK
    sysbench.sbtest19                                  OK
    sysbench.sbtest2                                   OK
    sysbench.sbtest20                                  OK
    sysbench.sbtest3                                   OK
    sysbench.sbtest4                                   OK
    sysbench.sbtest5                                   OK
    sysbench.sbtest6                                   OK
    sysbench.sbtest7                                   OK
    sysbench.sbtest8                                   OK
    sysbench.sbtest9                                   OK
    wenyz.t2                                           OK
    Upgrade process completed successfully.
    Checking if update is needed.
    
    

    重启mysql后恢复正常

    root@localhost [(none)]>show global variables like '%conn%';
    +-----------------------------------------------+-----------------+
    | Variable_name                                 | Value           |
    +-----------------------------------------------+-----------------+
    | character_set_connection                      | utf8            |
    | collation_connection                          | utf8_general_ci |
    | connect_timeout                               | 10              |
    | disconnect_on_expired_password                | ON              |
    | init_connect                                  |                 |
    | max_connect_errors                            | 100000          |
    | max_connections                               | 100             |
    | max_user_connections                          | 0               |
    | performance_schema_session_connect_attrs_size | 512             |
    +-----------------------------------------------+-----------------
    
  • 相关阅读:
    mac安装mysql 8.0.20
    leetcode之两数之和
    家人闲坐,灯火可亲汪曾祺散文集读书笔记
    java入门知识代码练习
    苏世民:我的经验与教训读后感
    java入门知识
    创业者日志——易居cms产品有什么不同的地方?
    易优CMS:channelartlist 获取当前频道的下级栏目的内容列表
    房产小程序可以实现什么功能?有什么优势?怎么推广小程序?
    房产中介是否需要用管理系统?哪个房产中介管理软件好?
  • 原文地址:https://www.cnblogs.com/2woods/p/9470856.html
Copyright © 2011-2022 走看看