mysql.proc is wrong_解决警告:数据库错误Column count of mysql.proc is wrong.

事实上,如果你使用

问题就因为你已升级MariaDB或

升级MariaDB或mysql_upgrade命令完成升级更新。

之后,操作MySQL数据库过程中,可能将显示错误消息.

警告: 数据库错误 Column count of mysql.proc is wrong. Expected 21, found 20. Created with MariaDB 50560, now running 100406. Please use mysql_upgrade to fix this error 查询 SHOW FUNCTION STATUS

mysql.proc 这是5.1中的系统表,它记录有关存储过程或函数的信息。

如何解决警告:数据库错误 Column count of mysql.proc is wrong?

以下是记录的解决方案。

第 1 步:保险做法是先dump或冷备份:

mysqldump -uroot -p123456 --quick --master-data=1 --all-databases --flush-logs --lock-tables >

请将以上的“123456”,改成你的MySQL的root密码。

第 2 步:使用以下mysql_upgrade 命令来解决

mysql_upgrade -u root --datadir=/var/lib/mysql/ --basedir=/ --password=123456

以下是SSH示范操作过程 ▼

[root@db lib]# mysql_upgrade -u root -p123456 -hdb --datadir=/var/lib/mysql/ --basedir=/

mysql_upgrade: the '--datadir' option is always ignored

mysql_upgrade: the '--basedir' option is always ignored

Looking for 'mysql' as: mysql

Looking for 'mysqlcheck' as: mysqlcheck

Running 'mysqlcheck' with connection arguments: '--host=db'

Running 'mysqlcheck' with connection arguments: '--host=db'

mysql.columns_priv OK

mysql.db OK

mysql.event OK

mysql.func OK

mysql.general_log

Error : You can't use locks with log tables.

status : 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.servers OK

mysql.slow_log

Error : You can't use locks with log tables.

status : OK

mysql.student OK

mysql.t1 OK

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

................................................

test.newuser OK

test.usertag OK

Running 'mysql_fix_privilege_tables'...

WARNING: NULL values of the 'character_set_client' column ('mysql.proc' table) have been updated with a default value (latin1). Please verify if necessary.

WARNING: NULL values of the 'collation_connection' column ('mysql.proc' table) have been updated with a default value (latin1_swedish_ci). Please verify if necessary.

WARNING: NULL values of the 'db_collation' column ('mysql.proc' table) have been updated with default values. Please verify if necessary.

OK

[root@db lib]#

本站声明:本站所有素材资源均来自用户分享和网络收集,仅供用于学习和研究目的。不得使用于非法商业用途,不得违反国家法律;如有侵权、不妥之处,请联系站长以便删除。敬请谅解!

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值