-->
当前位置:首页 > 运维 > 正文内容

mysql报错 [Warning] InnoDB: Table mysql/innodb_index_stats has length mismatch in the column name tabl

Luz1年前 (2023-10-01)运维1593

国庆第一天,醒来群里一堆艾特说平台无法登录。

排查

df -h 发现/data分区被占满

du -sh 追踪发现mysql的报错日志占了几百G

echo “1”>mysqld-log.err 由于文件太大先清空一下

再 tailf mysqld-log.err 查看新生成的内容

mysql存在大量警告

2023-10-01T10:36:07.337236+08:00 12696007 [Warning] InnoDB: Table mysql/innodb_index_stats has length mismatch in the column name table_name.  Please run mysql_upgrade
2023-10-01T10:36:07.337525+08:00 12696007 [Warning] InnoDB: Table mysql/innodb_table_stats has length mismatch in the column name table_name.  Please run mysql_upgrade
2023-10-01T10:36:07.337546+08:00 12696007 [Warning] InnoDB: Table mysql/innodb_index_stats has length mismatch in the column name table_name.  Please run mysql_upgrade
2023-10-01T10:36:07.337546+08:00 12696007 [Warning] InnoDB: Table mysql/innodb_index_stats has length mismatch in the column name table_name.  Please run mysql_upgrade
2023-10-01T10:36:07.373107+08:00 12696007 [Warning] InnoDB: Table mysql/innodb_table_stats has length mismatch in the column name table_name.  Please run mysql_upgrade
2023-10-01T10:36:07.373161+08:00 12696007 [Warning] InnoDB: Table mysql/innodb_index_stats has length mismatch in the column name table_name.  Please run mysql_upgrade
2023-10-01T10:36:07.377184+08:00 12696007 [Warning] InnoDB: Table mysql/innodb_table_stats has length mismatch in the column name table_name.  Please run mysql_upgrade
2023-10-01T10:36:07.377232+08:00 12696007 [Warning] InnoDB: Table mysql/innodb_index_stats has length mismatch in the column name table_name.  Please run mysql_upgrade
2023-10-01T10:36:07.404852+08:00 12696007 [Warning] InnoDB: Table mysql/innodb_table_stats has length mismatch in the column name table_name.  Please run mysql_upgrade
2023-10-01T10:36:07.404902+08:00 12696007 [Warning] InnoDB: Table mysql/innodb_index_stats has length mismatch in the column name table_name.  Please run mysql_upgrade
2023-10-01T10:36:07.414354+08:00 12696007 [Warning] InnoDB: Table mysql/innodb_table_stats has length mismatch in the column name table_name.  Please run mysql_upgrade
2023-10-01T10:36:07.414407+08:00 12696007 [Warning] InnoDB: Table mysql/innodb_index_stats has length mismatch in the column name table_name.  Please run mysql_upgrade
2023-10-01T10:36:07.415633+08:00 12696007 [Warning] InnoDB: Table mysql/innodb_table_stats has length mismatch in the column name table_name.  Please run mysql_upgrade
2023-10-01T10:36:07.415671+08:00 12696007 [Warning] InnoDB: Table mysql/innodb_index_stats has length mismatch in the column name table_name.  Please run mysql_upgrade
2023-10-01T10:36:07.429465+08:00 12696007 [Warning] InnoDB: Table mysql/innodb_table_stats has length mismatch in the column name table_name.  Please run mysql_upgrade
2023-10-01T10:36:07.429573+08:00 12696007 [Warning] InnoDB: Table mysql/innodb_index_stats has length mismatch in the column name table_name.  Please run mysql_upgrade
2023-10-01T10:36:07.508508+08:00 12696007 [Warning] InnoDB: Table mysql/innodb_table_stats has length mismatch in the column name table_name.  Please run mysql_upgrade
2023-10-01T10:36:07.508561+08:00 12696007 [Warning] InnoDB: Table mysql/innodb_index_stats has length mismatch in the column name table_name.  Please run mysql_upgrade
2023-10-01T10:36:07.509711+08:00 12696007 [Warning] InnoDB: Table mysql/innodb_table_stats has length mismatch in the column name table_name.  Please run mysql_upgrade
2023-10-01T10:36:07.509747+08:00 12696007 [Warning] InnoDB: Table mysql/innodb_index_stats has length mismatch in the column name table_name.  Please run mysql_upgrade
2023-10-01T10:36:07.510107+08:00 12696007 [Warning] InnoDB: Table mysql/innodb_table_stats has length mismatch in the column name table_name.  Please run mysql_upgrade
2023-10-01T10:36:07.510137+08:00 12696007 [Warning] InnoDB: Table mysql/innodb_index_stats has length mismatch in the column name table_name.  Please run mysql_upgrade

处理办法

mysql_upgrade –host=’127.0.0.1’ –port=3306 –user=’root’ –password=”mysql密码”

root@localhost:/data/mysql/data# mysql_upgrade --host='127.0.0.1' --port=3306 --user='root' --password=""
mysql_upgrade: [Warning] Using a password on the command line interface can be insecure.
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
Found outdated sys schema version 1.5.1.
Upgrading the sys schema.
Checking databases.
auth.c_auth_app_identity                           OK
auth.c_auth_message_template                       OK
auth.c_auth_service                                OK
auth.c_auth_service_config                         OK
auth.c_auth_supplier                               OK
auth.c_auth_template_param                         OK
auth.c_auth_verification_code                      OK
auth.sys_version                                   OK
authdb2.vsl_sys_log                                OK
authdb2.vsl_sys_org                                OK
authdb2.vsl_sys_role                               OK
authdb2.vsl_sys_role_sign                          OK
authdb2.vsl_sys_subsystem                          OK
authdb2.vsl_sys_user                               OK
authdb2.vsl_sys_user_ext                           OK
authdb2.vsl_sys_user_question                      OK
authdb2.vsl_sys_user_role                          OK
authdb2.vsl_sys_version                            OK
data_analysis.alarm_policy                         OK
data_analysis.channel                              OK
data_analysis.channel_analysis                     OK
data_analysis.channel_lack_count                   OK
data_analysis.device                               OK
data_analysis.metric_collection                    OK
data_analysis.organize                             OK
dcms.data_task                                     OK
dcms.data_task_source                              OK
dcms.dcms_dict                                     OK
dcms.m_alarm_rule                                  OK
dcms.m_sms_info                                    OK
dcms.server_info                                   OK
dcms.service_data                                  OK
dcms.service_error                                 OK
dcms.service_info                                  OK
dcms.sys_version                                   OK
emap.emap_area_position                            OK
emap.emap_area_position_community                  OK
emap.emap_config                                   OK
emap.emap_ext_poi                                  OK
emap.emap_gps                                      OK
emap.emap_gps_his                                  OK
emap.emap_group                                    OK
emap.emap_group_channel_relation                   OK
emap.emap_guard_task                               OK
emap.emap_main_map                                 OK
emap.emap_mark_poi                                 OK
emap.emap_menu                                     OK
emap.emap_menu_privilege                           OK
emap.emap_poi                                      OK
emap.emap_poi_device                               OK
emap.emap_poi_layer                                OK
emap.emap_raster                                   OK
emap.emap_user_init_position                       OK
emap.version_info                                  OK
inspect_db.plan_info                               OK
inspect_db.plan_target                             OK
inspect_db.subtask_detail                          OK
inspect_db.subtask_info                            OK
inspect_db.task_info                               OK
inspect_db.task_summary                            OK
nextdb2.p_dprecord                                 OK
nextdb2.p_dprecord_img                             OK
nextdb2.p_picrecord                                OK
nextdb2.p_picrecord_img                            OK
nextdb2.p_rfid_record                              OK
nextdb2.vias_pas_analyze                           OK
nextdb2.vias_pas_analyze_marker                    OK
nextdb2.vsl_alarm_link_email_template              OK
nextdb2.vsl_alarm_link_info                        OK
nextdb2.vsl_alarm_link_preset                      OK
nextdb2.vsl_alarm_link_realmonitor                 OK
nextdb2.vsl_alarm_link_record                      OK
nextdb2.vsl_alarm_link_sms_template                OK
nextdb2.vsl_alarm_link_view                        OK
nextdb2.vsl_alarm_link_wall                        OK
nextdb2.vsl_alarm_link_wall_realmonitor            OK
nextdb2.vsl_alarm_link_window                      OK
nextdb2.vsl_alarm_plan                             OK
nextdb2.vsl_alarm_record                           OK
nextdb2.vsl_alarm_source                           OK
nextdb2.vsl_alarm_source_rule                      OK
nextdb2.vsl_alarm_type                             OK
nextdb2.vsl_alarm_type_relation                    OK
nextdb2.vsl_alarm_user_relation                    OK
nextdb2.vsl_cascade_channel_backup                 OK
nextdb2.vsl_cascade_rule                           OK
nextdb2.vsl_cascade_type                           OK
nextdb2.vsl_cert                                   OK
nextdb2.vsl_chl_resource_binding                   OK
nextdb2.vsl_common_time_period                     OK
nextdb2.vsl_common_time_template                   OK
nextdb2.vsl_csr_cert                               OK
nextdb2.vsl_data_backup                            OK
nextdb2.vsl_dev                                    OK
nextdb2.vsl_dev_accessctrl_chn                     OK
nextdb2.vsl_dev_accessctrl_unit                    OK
nextdb2.vsl_dev_alarmin_chn                        OK
nextdb2.vsl_dev_alarmin_subsystem                  OK
nextdb2.vsl_dev_alarmin_unit                       OK
nextdb2.vsl_dev_alarmin_unit_copy0929              OK
nextdb2.vsl_dev_alarmout_chn                       OK
nextdb2.vsl_dev_alarmout_unit                      OK
nextdb2.vsl_dev_audio_chn                          OK
nextdb2.vsl_dev_audio_unit                         OK
nextdb2.vsl_dev_common_chn                         OK
nextdb2.vsl_dev_decoder_chn                        OK
nextdb2.vsl_dev_decoder_unit                       OK
nextdb2.vsl_dev_detector_chn                       OK
nextdb2.vsl_dev_detector_unit                      OK
nextdb2.vsl_dev_dyn_chn                            OK
nextdb2.vsl_dev_dyn_unit                           OK
nextdb2.vsl_dev_encoder_chn                        OK
nextdb2.vsl_dev_encoder_chn_ext                    OK
nextdb2.vsl_dev_encoder_unit                       OK
nextdb2.vsl_dev_finder_chn                         OK
nextdb2.vsl_dev_finder_unit                        OK
nextdb2.vsl_dev_led_chn                            OK
nextdb2.vsl_dev_led_unit                           OK
nextdb2.vsl_dev_log                                OK
nextdb2.vsl_dev_mac_chn                            OK
nextdb2.vsl_dev_mac_config                         OK
nextdb2.vsl_dev_mac_unit                           OK
nextdb2.vsl_dev_network_topology                   OK
nextdb2.vsl_dev_parking                            OK
nextdb2.vsl_dev_pass_reset                         OK
nextdb2.vsl_dev_public_cloud_account_relation      OK
nextdb2.vsl_dev_rfid_chn                           OK
nextdb2.vsl_dev_rfid_unit                          OK
nextdb2.vsl_dev_screenctrlin_chn                   OK
nextdb2.vsl_dev_screenctrlin_unit                  OK
nextdb2.vsl_dev_screenctrlout_chn                  OK
nextdb2.vsl_dev_screenctrlout_unit                 OK
nextdb2.vsl_dev_sluice_chn                         OK
nextdb2.vsl_dev_sluice_unit                        OK
nextdb2.vsl_dev_sync_proc                          OK
nextdb2.vsl_dev_system_param_config                OK
nextdb2.vsl_dev_watcher                            OK
nextdb2.vsl_device_offline_reason                  OK
nextdb2.vsl_device_status                          OK
nextdb2.vsl_domain                                 OK
nextdb2.vsl_domain_ext                             OK
nextdb2.vsl_domain_org                             OK
nextdb2.vsl_door_channel_sub_conntrol_relation     OK
nextdb2.vsl_door_reader_info                       OK
nextdb2.vsl_door_sub_control                       OK
nextdb2.vsl_gm_server_config                       OK
nextdb2.vsl_ip_config                              OK
nextdb2.vsl_logic_chnl                             OK
nextdb2.vsl_logic_dev                              OK
nextdb2.vsl_logic_org                              OK
nextdb2.vsl_logic_resource                         OK
nextdb2.vsl_logic_role                             OK
nextdb2.vsl_opt_user_file                          OK
nextdb2.vsl_opt_video_plan                         OK
nextdb2.vsl_org_site                               OK
nextdb2.vsl_picture_quato                          OK
nextdb2.vsl_pictures_lifecycle                     OK
nextdb2.vsl_place                                  OK
nextdb2.vsl_public_cloud_account                   OK
nextdb2.vsl_record_lock4time_info                  OK
nextdb2.vsl_record_lock_file_relation              OK
nextdb2.vsl_record_lock_info                       OK
nextdb2.vsl_record_period                          OK
nextdb2.vsl_record_tag_info                        OK
nextdb2.vsl_region                                 OK
nextdb2.vsl_region_config                          OK
nextdb2.vsl_region_record                          OK
nextdb2.vsl_region_storage_quota                   OK
nextdb2.vsl_security_vendor                        OK
nextdb2.vsl_site                                   OK
nextdb2.vsl_site_place                             OK
nextdb2.vsl_storage_chn                            OK
nextdb2.vsl_storage_plan                           OK
nextdb2.vsl_storage_reduncance                     OK
nextdb2.vsl_subsystem_log                          OK
nextdb2.vsl_sys_chn_org                            OK
nextdb2.vsl_sys_code                               OK
nextdb2.vsl_sys_code_type                          OK
nextdb2.vsl_sys_config                             OK
nextdb2.vsl_sys_key_pair                           OK
nextdb2.vsl_sys_log                                OK
nextdb2.vsl_sys_menu                               OK
nextdb2.vsl_sys_menu_comp                          OK
nextdb2.vsl_sys_menu_comp_type                     OK
nextdb2.vsl_sys_menu_priv                          OK
nextdb2.vsl_sys_org                                OK
nextdb2.vsl_sys_org_xpath                          OK
nextdb2.vsl_sys_priv                               OK
nextdb2.vsl_sys_priv_ext                           OK
nextdb2.vsl_sys_priv_part_0                        OK
nextdb2.vsl_sys_priv_part_1                        OK
nextdb2.vsl_sys_priv_part_2                        OK
nextdb2.vsl_sys_priv_part_3                        OK
nextdb2.vsl_sys_priv_part_4                        OK
nextdb2.vsl_sys_priv_part_5                        OK
nextdb2.vsl_sys_priv_part_6                        OK
nextdb2.vsl_sys_priv_part_7                        OK
nextdb2.vsl_sys_priv_part_8                        OK
nextdb2.vsl_sys_priv_part_9                        OK
nextdb2.vsl_sys_priv_part_a                        OK
nextdb2.vsl_sys_priv_part_b                        OK
nextdb2.vsl_sys_priv_part_c                        OK
nextdb2.vsl_sys_priv_part_d                        OK
nextdb2.vsl_sys_priv_part_e                        OK
nextdb2.vsl_sys_priv_part_f                        OK
nextdb2.vsl_sys_version                            OK
nextdb2.vsl_video_chn_org                          OK
nextdb2.vsl_video_log                              OK
nextdb2.vsl_video_org                              OK
nextdb2.vsl_video_plan                             OK
nextdb2.vsl_video_screen                           OK
nextdb2.vsl_video_wall                             OK
nextdb2.vsl_video_wall_plan                        OK
nextdb2.vsl_video_wall_priv                        OK
nextdb2.vsl_video_window                           OK
open_falcon.action                                 OK
open_falcon.alert_link                             OK
open_falcon.cluster                                OK
open_falcon.dashboard_graph                        OK
open_falcon.dashboard_screen                       OK
open_falcon.endpoint                               OK
open_falcon.endpoint_counter                       OK
open_falcon.event_cases                            OK
open_falcon.event_ignore                           OK
open_falcon.event_info                             OK
open_falcon.event_note                             OK
open_falcon.events                                 OK
open_falcon.expression                             OK
open_falcon.grp                                    OK
open_falcon.grp_host                               OK
open_falcon.grp_tpl                                OK
open_falcon.host                                   OK
open_falcon.host_tmp                               OK
open_falcon.mockcfg                                OK
open_falcon.plugin_dir                             OK
open_falcon.rel_team_user                          OK
open_falcon.session                                OK
open_falcon.strategy                               OK
open_falcon.tag_endpoint                           OK
open_falcon.team                                   OK
open_falcon.tmp_graph                              OK
open_falcon.tpl                                    OK
open_falcon.user                                   OK
phoenix_alarm.alarm_action                         OK
phoenix_alarm.alarm_influxdb_conf                  OK
phoenix_alarm.alarm_metrics                        OK
phoenix_alarm.alarm_metrics_type                   OK
phoenix_alarm.alarm_notification_items             OK
phoenix_alarm.alarm_notification_list              OK
phoenix_alarm.alarm_policies                       OK
phoenix_alarm.alarm_policy_rules                   OK
phoenix_alarm.alarm_resource                       OK
phoenix_alarm.alarm_subscription_info              OK
phoenix_alarm.alarm_sys_sms                        OK
phoenix_alarm.alarm_sys_smtp                       OK
phoenix_alarm.message_transmissions                OK
phoenix_api_db.config_info                         OK
phoenix_api_db.other_system                        OK
phoenix_api_db.parent_region                       OK
phoenix_api_db.question                            OK
phoenix_api_db.region_info                         OK
phoenix_api_db.service_info                        OK
phoenix_api_db.sub_region                          OK
phoenix_api_db.sys_log                             OK
phoenix_api_db.user                                OK
phoenix_api_db.user_to_question                    OK
phoenix_api_db.user_to_region                      OK
phoenix_machine.attr_info                          OK
phoenix_machine.cabinet_info                       OK
phoenix_machine.machine_info                       OK
phoenix_machine.model_attr_value                   OK
phoenix_machine.model_info                         OK
phoenix_machine.model_node_attr_value              OK
phoenix_machine.node_attr_value                    OK
phoenix_machine.node_info                          OK
phoenix_machine.type_attr                          OK
phoenix_machine.type_info                          OK
phoenix_service.backup_detail                      OK
phoenix_service.backup_info                        OK
phoenix_service.cluster_attribute                  OK
phoenix_service.cluster_info                       OK
phoenix_service.cluster_product                    OK
phoenix_service.cluster_relation                   OK
phoenix_service.cluster_user                       OK
phoenix_service.disaster_recovery_info             OK
phoenix_service.disaster_recovery_progress_info    OK
phoenix_service.ip_config_info                     OK
phoenix_service.paas_user                          OK
phoenix_service.package_info                       OK
phoenix_service.pro_service_version                OK
phoenix_service.progress_info                      OK
phoenix_service.service_config                     OK
phoenix_service.service_manager                    OK
phoenix_service.service_task                       OK
phoenix_service.solution_cluster                   OK
phoenix_service.solution_history                   OK
psib.c_psi_chn                                     OK
psib.c_psi_chn_analysis                            OK
psib.c_psi_chn_import                              OK
psib.c_psi_dev                                     OK
psib.c_psi_dev_encoder_unit                        OK
psib.c_psi_org                                     OK
psib.c_psi_preset_task                             OK
psib.c_psi_task_config                             OK
psib.c_psi_video_share_info                        OK
psib.c_psi_video_share_sync                        OK
psib.sys_version                                   OK
ras.c_sys_author                                   OK
ras.c_sys_custom_condition                         OK
ras.c_sys_department                               OK
ras.c_sys_dic                                      OK
ras.c_sys_dic_240bak                               OK
ras.c_sys_dic_type                                 OK
ras.c_sys_feedback                                 OK
ras.c_sys_menu                                     OK
ras.c_sys_menu_priv                                OK
ras.c_sys_notice                                   OK
ras.c_sys_notice_attach                            OK
ras.c_sys_notice_receiver                          OK
ras.c_sys_operation                                OK
ras.c_sys_operation_author                         OK
ras.c_sys_resource_share                           OK
ras.c_sys_user                                     OK
ras.c_sys_user_attention                           OK
ras.c_sys_user_author                              OK
ras.c_sys_user_resource                            OK
ras.c_sys_user_scope                               OK
ras.c_sys_user_tag                                 OK
ras.c_sys_user_terminal                            OK
ras.sys_version                                    OK
resourceService.ip_history                         OK
resourceService.ip_item                            OK
resourceService.ip_segment                         OK
resourceService.license_info                       OK
resourceService.resource                           OK
resourceService.resource_eth                       OK
resourceService.resource_search                    OK
resourceService.resource_usage                     OK
resourceService.service_cfg                        OK
resourceService.service_info                       OK
resourceService.service_state                      OK
sls.c_sls_req_info_log                             OK
sls.c_sls_req_info_log_archive                     OK
sls.c_sls_sub_sys_log                              OK
sls.operation_dict                                 OK
sls.operation_log                                  OK
sls.sys_version                                    OK
sys.sys_config                                     OK
Upgrade process completed successfully.
Checking if update is needed.

重启mysql

root@localhost:/data/mysql/data# service mysqld restart
Stopping mysqld:                                           [  OK  ]
Starting mysqld:                                           [  OK  ]

image.png

平台登录正常了

发表评论

访客

◎欢迎参与讨论,请在这里发表您的看法和观点。