mysql_upgrade
发表于:2026-11-01 作者:千家信息网编辑
千家信息网最后更新 2026年11月01日,测试环境上配置主从的时候:CHANGE MASTER TO MASTER_HOST='10.30.xx.xxx',MASTER_USER='repl',MASTER_PASSWORD='123456'
千家信息网最后更新 2026年11月01日mysql_upgrade测试环境上配置主从的时候:
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.
查看主从的配置文件都指定了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.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
然后重启一下mysql就ok了。
mysql_upgrade升级的时候,检查不兼容的表,更新grant表;
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.
查看主从的配置文件都指定了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.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
然后重启一下mysql就ok了。
mysql_upgrade升级的时候,检查不兼容的表,更新grant表;
主从
时候
配置
文件
环境
升级
更新
检查
测试
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
哈尔滨大商圈互联网科技有限公司
广州大一互联网络科技有限公司
蓝思科技飞鸽互联网
关于新基建和互联网科技
互联网科技的发展
互联网科技视频
奔汉互联网科技
上游互联网科技
互联网科技大会
互联网科技咨询
银川新华互联网科技学校地址
互联网为啥属于高科技
花神(南京)互联网科技有限公司
互联网科技如何创业
伍佰万互联网科技怎么赚钱
21世纪互联网科技成就
互联网科技平台产品运营
互联网时代高科技布局
众联互联网络科技
互联网科技博主张洲
互联网佳科技有限公司
科技金融是不是互联网金融
金诺互联网科技
猪兼强互联网科技
新华互联网科技校企合作
深圳市运趣互联网科技有限公司
互联网之后的科技是什么
青岛科技大学互联网大赛研究生
伍佰万互联网科技怎么赚钱
恒生互联网科技趋势