Mysql_upgrade
When configuring the master and slave on the test environment:
CHANGE MASTER TO MASTER_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.
Check that server_id is specified in the master and slave configuration files, and then check 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 MySQL Community Server' 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
Solution:. / mysql_upgrade-h 10.30.x.x-umha-pendant 123456'-P 3316-force socket=/tmp/mysql.sock
Running queries to upgrade MySQL server.
Checking system database.
Mysql.columns_priv OK
Mysql.db OK
Mysql.dml_health_check OK
Mysql.engine_cost OK
Mysql.event OK
Mysql.failover_info OK
Mysql.func OK
Mysql.general_log OK
Mysql.gtid_executed OK
Mysql.ha_health_check 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.rds_table_checksums 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
Upgrading the sys schema.
Checking databases.
Card_center.system_cache OK
Card_center.system_session OK
Then restart mysql and ok.
When mysql_upgrade upgrades, check for incompatible tables and update the grant table