Home  >  Article  >  Database  >  MySQL导出数据库结构出现Cannot load from mysql.proc错误的解决方法

MySQL导出数据库结构出现Cannot load from mysql.proc错误的解决方法

WBOY
WBOYOriginal
2016-06-07 17:33:521160browse

今天在CentOS6.4中对MySQL从5.1升级到5.6的版本之后,在使用Navicat Premium客户端管理工具的时候,发现写sql语句的智能提示没有

今天在CentOS6.4中对MySQL从5.1升级到5.6的版本之后,在使用Navicat Premium客户端管理工具的时候,,发现写sql语句的智能提示没有了,这里绝对不是管理工具的配置问题,我测试了在另外一台MySQL5.5的机器上是没有这个问题。

没有提示也就算了,当我把表建好之后,想保存备份一下表结构时,提示如下错误:

Cannot load from mysql.proc. The table is probably corrupted

截图如下:

MySQL导出数据库结构出现Cannot load from mysql.proc错误的解决方法

在网上搜了下解决方法,所有的文章几乎都是这么说:

执行以下命令:

mysql_upgrade -uroot -p密码

我试了无数次,在我这里无效,问题还是没有得到解决,因为不影响工作,所以问题就暂时放下了没有去处理。

当我闲下来,无聊的时候,又在搜索这个问题的解决方法,功夫不负有心人啊,让我找到了这篇文章:

也就是从mysql5.5的版本开始,proc这张表中的comment字段的列属性已经由char(64)改为text类型,我们需要更改一下数据类型:

ALTER TABLE `proc`

MODIFY COLUMN `comment`  text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL AFTER `sql_mode`;

最后问题得到了解决。

linux

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn