Solve the warning: database error Column count of mysql.proc is wrong.

In fact, if you usephpMyAdmin, you can't find the error where is the problem?

  • The problem is because you have upgraded MariaDB orMySQL databaseversion.
  • Upgrade MariaDB orMySQLAfter the database version, the data structures are not usedmysql_upgradecommand to complete the upgrade update.
  • Afterwards, during operation of the MySQL database, error messages may be displayed.

Solve the warning: database error Column count of mysql.proc is wrong.

WordPress pluginDuring the automatic backup process, the following error occurred ▼

Warning: Database error 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 Query SHOW FUNCTION STATUS

  • mysql.proc This is a system table in 5.1 that records information about stored procedures or functions.

How to fix the warning: Database error Column count of mysql.proc is wrong?

The following isChen Weiliangdocumented solution.

Step 1:Safe practice is to dump or cold backup first:

mysqldump -uroot -p123456 --quick --master-data=1 --all-databases --flush-logs --lock-tables >
  • Please change the above "123456" to your MySQL root password.

Step 2:use the followingmysql_upgrade command to resolve

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

The following is the SSH demonstration operation process▼

[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]#

There are more solutions to MySQL database problems below▼

Hope Chen Weiliang Blog ( https://www.chenweiliang.com/ ) shared "Solving Warning: Database Error Column count of mysql.proc is wrong.", helpful to you.

Welcome to share the link of this article:https://www.chenweiliang.com/cwl-1096.html

Welcome to the Telegram channel of Chen Weiliang's blog to get the latest updates!

🔔 Be the first to get the valuable "ChatGPT Content Marketing AI Tool Usage Guide" in the channel top directory! 🌟
📚 This guide contains huge value, 🌟This is a rare opportunity, don’t miss it! ⏰⌛💨
Share and like if you like!
Your sharing and likes are our continuous motivation!

 

Comment

Your email address will not be published. Required fields * Callout

scroll to top