mysql删除用户错误_mysql删除用户错误ERROR 1558解决办法

1、错误提示

ERROR 1558 (HY000): Column count of mysql.user is wrong. Expected 43, found 42. Created with MySQL 50560, now running 50645. Please use mysql_upgrade to fix this error.

意思是数据库以前做过升级但是数据库里的mysql库没有升级导致的权限混乱

2、解决办法

升级数据库使用命令

mysql_upgrade -uroot -p ‘密码’

Enter password:

Looking for 'mysql' as: mysql

Looking for 'mysqlcheck' as: mysqlcheck

Running 'mysqlcheck with default connection arguments

Warning: Using a password on the command line interface can be insecure.

Running 'mysqlcheck with default connection arguments

Warning: Using a password on the command line interface can be insecure.

mysql.columns_priv OK

mysql.db OK

mysql.event OK

mysql.func OK

mysql.general_log OK

mysql.help_category OK

mysql.help_keyword OK

mysql.help_relation OK

mysql.help_topic OK

mysql.host OK

mysql.ndb_binlog_index OK

mysql.plugin OK

mysql.proc OK

mysql.procs_priv OK

mysql.proxies_priv OK

mysql.servers 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

Running 'mysql_fix_privilege_tables'...

Warning: Using a password on the command line interface can be insecure.

Running 'mysqlcheck with default connection arguments

Warning: Using a password on the command line interface can be insecure.

Running 'mysqlcheck with default connection arguments

Warning: Using a password on the command line interface can be insecure.

mysqlcheck: Got error: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.2_b_cloud_provider FOR UPGRADE' at line 1 when executing 'CHECK TABLE ... FOR UPGRADE'

cb-fetch-data-pre.cron_task OK

cb-fetch-data-pre.cron_task_result OK

cb-fetch-data-pre.xxl_job_qrtz_blob_triggers OK

cb-fetch-data-pre.xxl_job_qrtz_calendars OK

cb-fetch-data-pre.xxl_job_qrtz_cron_triggers OK

cb-fetch-data-pre.xxl_job_qrtz_fired_triggers OK

cb-fetch-data-pre.xxl_job_qrtz_job_details OK

cb-fetch-data-pre.xxl_job_qrtz_locks OK

cb-fetch-data-pre.xxl_job_qrtz_paused_trigger_grps OK

cb-fetch-data-pre.xxl_job_qrtz_scheduler_state OK

cb-fetch-data-pre.xxl_job_qrtz_simple_triggers OK

cb-fetch-data-pre.xxl_job_qrtz_simprop_triggers OK

cb-fetch-data-pre.xxl_job_qrtz_trigger_group OK

cb-fetch-data-pre.xxl_job_qrtz_trigger_info OK

cb-fetch-data-pre.xxl_job_qrtz_trigger_log OK

cb-fetch-data-pre.xxl_job_qrtz_trigger_logglue OK

cb-fetch-data-pre.xxl_job_qrtz_trigger_registry OK

cb-fetch-data-pre.xxl_job_qrtz_triggers OK

cloudbest-index-point-pre.b_cloud_provider OK

cloudbest-index-point-pre.cron_task OK

cloudbest-index-point-pre.cron_task_result_2019_09 OK

cloudbest-index-point-pre.cron_task_result_2019_10 OK

cloudbest-index-point-pre.cron_task_result_2019_11 OK

cloudbest-index-point-pre.cron_task_result_2019_12 OK

cloudbest-index-point-pre.cron_task_result_2020_01 OK

cloudbest-index-point-pre.cron_task_result_2020_02 OK

cloudbest-index-point-pre.cron_task_result_2020_03 OK

cloudbest-index-point-pre.cron_task_result_2020_04 OK

cloudbest-index-point-pre.cron_task_result_2020_05 OK

cloudbest-index-point-pre.cron_task_result_2020_06 OK

cloudbest-index-point-pre.cron_task_result_2020_07 OK

cloudbest-index-point-pre.cron_task_result_2020_08 OK

cloudbest-index-point-pre.cron_task_result_2020_09 OK

cloudbest-index-point-pre.i_index_rank OK

cloudbest-index-point-pre.i_instances OK

cloudbest-index-point-pre.i_model OK

cloudbest-index-point-pre.i_model_price OK

cloudbest-index-point-pre.i_performance_reportes OK

cloudbest-index-point-pre.i_region OK

cloudbest-index-point-pre.statistic_index OK

cloudbest-market.ddos_accounts OK

cloudbest-market.ddos_custom OK

cloudbest-market.ddos_shield_info OK

cloudbest-market.ddos_task_queue OK

cloudbest-order.cb_order OK

FATAL ERROR: Error during call to mysql_check for upgrading the tables names on all db(s) except mysql

最后一个错误是因为其他的数据库表没法更改,这个不会影响。 到这算是解决上面的错误。权限可以正常使用了

来源:51CTO

作者:汤向峰

链接:https://blog.51cto.com/12226796/2457370

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值