mysql 1558 - Column count of mysql.proc is wrong 的解決
起因是原來mysql是5.0.47的,後來想用分割槽表,故整個庫匯出,
然後倒入5.1.51的環境中,但是在建立儲存過程中出現如下錯誤:
1558 - Column count of mysql.proc is wrong. Expected 20, found 16
1 :保險一點先dump或者冷備份:
mysqldump -uroot -p111111 --quick --master-data=1 --all-databases --flush-logs --lock-tables >
2 解決辦法:
使用命令:mysql_upgrade 就可以解決
mysql_upgrade -u root --datadir=/var/lib/mysql/ --basedir=/ --password=123456
下面是我操作的過程:
[root@db lib]# mysql_upgrade -u root -p111111 -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]#
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/758322/viewspace-716971/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- MySQL 5.7 建立使用者報錯 ERROR 1805 (HY000): Column count of mysql.user is wrongMySqlError
- count(0),count(1),count(*)總結與count(column)
- count(*) 和count(column)之區別
- 安裝mysql遇到ERROR: 1136 Column count doesn't match value count at row 1MySqlError
- mysql Unknown column ‘‘ in ‘field list‘解決方案MySql
- MySQL的COUNT語句--count(*)、 count(常量)、 count(列名)MySql
- Ask Hoegh(4)——select count(*)和select count(1)、count(column)有區別嗎?
- 圖解MySQL:count(*) 、count(1) 、count(主鍵欄位)、count(欄位)哪個效能最好?圖解MySql
- MySQL資料庫index column size too large. the maximum column size is 767 bytes問題解決MySql資料庫Index
- MySQL中count(*)函式原理詳解MySql函式
- mysql count()的使用解析MySql
- mysql中count的用法MySql
- mysql Index column size too large 超過767錯誤解決方案(轉)MySqlIndex
- pymysql.err.OperationalError: (1136, “Column count doesn‘t match value count at row 1“)報錯反省。MySqlError
- MySQL ERROR 1366(HY000):Incorrect string value:''for column''at row 1解決方案MySqlError
- mysql中count(1)與count(*)比較MySql
- 【MySQL】效能優化之 count(*) VS count(col)MySql優化
- 【c++】淺拷貝成功__count解決C++
- Undefined property: stdClass::$column_name 怎麼解決?Undefined
- MySQL:count(*) count(欄位) 實現上區別MySql
- MySQL Count(*)提速30倍MySql
- [20180608]Wrong Results with IOT, Added Column and Secondary Index.txtIndex
- 深度解讀GaussDB(for MySQL)與MySQL的COUNT查詢並行最佳化策略MySql並行
- [20180609]Wrong Results with IOT, Added Column and Secondary Index2.txtIndex
- centos Vmware虛擬機器 Oh no,something has gone wrong! 解決方法CentOS虛擬機Go
- JPA的Column註解總結
- MySQL優化COUNT()查詢MySql優化
- MySQL:SELECT COUNT 小結MySql
- mysql count函式說明MySql函式
- count(1),count(*),count(列)的區別
- What is wrong?
- count(*)、count(1)和count(列名)的區別
- MySQL中 found_rows()和row_count()解釋及用法MySql
- redis 報Operation against a key holding the wrong kind of value警告的解決方法RedisAI
- 解決busuanzi_count突然失效的方法(hexo-theme-next)Hexo
- 百萬資料 mysql count(*)優化MySql優化
- Hibernate 註解@Column(nullable = false) 和 @Column(unique=true)NullFalse
- MySQL裡的found_row()與row_count()MySql