• ADADADADAD

    mysql_upgrade[ mysql数据库 ]

    mysql数据库 时间:2024-12-24 19:11:31

    作者:文/会员上传

    简介:

    测试环境上配置主从的时候:
    CHANGE MASTER TOMASTER_HOST='10.30.xx.xxx',MASTER_USER='repl',MASTER_PASSWORD='123456',MASTER_PORT=3306,MASTER_LOG_FILE='mysql-bin.0000

    以下为本文的正文内容,内容仅供参考!本站为公益性网站,复制本文以及下载DOC文档全部免费。

    测试环境上配置主从的时候:
    CHANGE MASTER TOMASTER_HOST='10.30.xx.xxx',MASTER_USER='repl',MASTER_PASSWORD='123456',MASTER_PORT=3306,MASTER_LOG_FILE='mysql-bin.000027',MASTER_LOG_POS=4, MASTER_CONNECT_RETRY=10;
    ERROR 1794 (HY000): Slave is not configured or failed to initialize properly. You must at least set --server-id to enable either a master or a slave. Additional error messages can be found in the MySQL error log.
    查看主从的配置文件都指定了server_id,然后查看err-log
    2018-05-23T02:23:46.047520Z 0 [ERROR] Native table 'performance_schema'.'status_by_thread' has the wrong structure
    2018-05-23T02:23:46.047537Z 0 [ERROR] Native table 'performance_schema'.'status_by_user' has the wrong structure
    2018-05-23T02:23:46.047554Z 0 [ERROR] Native table 'performance_schema'.'global_status' has the wrong structure
    2018-05-23T02:23:46.047571Z 0 [ERROR] Native table 'performance_schema'.'session_status' has the wrong structure
    2018-05-23T02:23:46.047588Z 0 [ERROR] Native table 'performance_schema'.'variables_by_thread' has the wrong structure
    2018-05-23T02:23:46.047605Z 0 [ERROR] Native table 'performance_schema'.'global_variables' has the wrong structure
    2018-05-23T02:23:46.047622Z 0 [ERROR] Native table 'performance_schema'.'session_variables' has the wrong structure
    2018-05-23T02:23:46.047830Z 0 [Note] /usr/local/mysql/bin/mysqld: ready for connections.
    Version: '5.7.21-log' socket: '/tmp/mysql.sock' port: 3316 MySQL Community Server (GPL)
    2018-05-23T02:23:46.980770Z 0 [Note] InnoDB: Buffer pool(s) load completed at 180523 10:23:46
    解决:./mysql_upgrade -h 10.30.x.x -umha -p'123456' -P 3316 --force socket=/tmp/mysql.sock
    Running queries to upgrade MySQL server.
    Checking system database.
    mysql.columns_priv OK
    mysql.dbOK
    mysql.dml_health_check OK
    mysql.engine_cost OK
    mysql.eventOK
    mysql.failover_infoOK
    mysql.func OK
    mysql.general_log OK
    mysql.gtid_executedOK
    mysql.ha_health_check OK
    mysql.help_categoryOK
    mysql.help_keyword OK
    mysql.help_relationOK
    mysql.help_topicOK
    mysql.innodb_index_statsOK
    mysql.innodb_table_statsOK
    mysql.ndb_binlog_index OK
    mysql.pluginOK
    mysql.proc OK
    mysql.procs_privOK
    mysql.proxies_priv OK
    mysql.rds_table_checksums OK
    mysql.server_cost OK
    mysql.servers OK
    mysql.slave_master_infoOK
    mysql.slave_relay_log_info OK
    mysql.slave_worker_infoOK
    mysql.slow_log OK
    mysql.tables_priv OK
    mysql.time_zoneOK
    mysql.time_zone_leap_secondOK
    mysql.time_zone_nameOK
    mysql.time_zone_transition OK
    mysql.time_zone_transition_typeOK
    mysql.user OK
    Upgrading the sys schema.
    Checking databases.
    card_center.system_cacheOK
    card_center.system_session OK
    然后重启一下mysql就ok了。

    mysql_upgrade升级的时候,检查不兼容的表,更新grant表;






    mysql_upgrade.docx

    将本文的Word文档下载到电脑

    推荐度:

    下载
    热门标签: mysqlupgradegr