MySQL Workbench 无法加载 mysql.proc

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/6789373/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-31 20:35:13  来源:igfitidea点击:

MySQL Workbench cannot load mysql.proc

mysqlmysql-workbench

提问by Jakub Mach

I am starting to use MySQL Workbench tool especially for data modeling. So, the first I would like to do is reverse engineering of my existing database on web server. But I not able to finish the process, because I alway get this strange error message:

我开始使用 MySQL Workbench 工具,特别是用于数据建模。因此,我想做的第一件事是对 Web 服务器上的现有数据库进行逆向工程。但是我无法完成这个过程,因为我总是收到这个奇怪的错误消息:

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

I tried to repair this table but it not help me. So, do you have any experience with this problem and know how to solve it?

我试图修理这张桌子,但它对我没有帮助。那么,您对这个问题有任何经验并知道如何解决吗?

回答by Kevin

I'm using MySQL version 5.5.9 on MAC. I fixed this problem by running:

我在 MAC 上使用 MySQL 5.5.9 版。我通过运行解决了这个问题:

mysql_upgrade -uroot -p

回答by pmking

I'm using MySQL trough MAMP Pro, and Kevin's answer didn't work for me. Yes, I had to do a mysql upgradeBUT I had to use the following commands on the Terminal:

我正在通过 MAMP Pro 使用 MySQL,而 Kevin 的回答对我不起作用。是的,我必须进行mysql 升级,但我必须在终端上使用以下命令:

/Applications/MAMP/bin/repairMysql.sh
/Applications/MAMP/bin/upgradeMysql.sh

This worked for me. Hope this can be helpful to somebody else..

这对我有用。希望这可以对其他人有所帮助..

回答by Bimal Poudel

I used XAMPP in CentOS and manually upgraded the XAMPP except the existing data folder. With the new server software of MySQL and old database files, I got the same error.

我在 CentOS 中使用了 XAMPP 并手动升级了 XAMPP 除了现有的数据文件夹。使用MySQL的新服务器软件和旧数据库文件,我得到了同样的错误。

I did with this solution and worked fine:

我使用了这个解决方案并且工作正常:

cd /opt/lampp/bin
./mysql_upgrade -uroot -p

It looped through almost all tables in the system, but ended with a fixed issue.

它遍历了系统中几乎所有的表,但以一个固定的问题结束。

回答by akikara

I am using Centos 6.5 for Server purposes. And Mysql Workbench for ERR Diagram. I got the same error. Answers above did not work for me.

我将 Centos 6.5 用于服务器目的。以及用于 ERR 图的 Mysql Workbench。我得到了同样的错误。上面的答案对我不起作用。

This answer is based on changing data type for comment column. And works like charm.

此答案基于更改评论列的数据类型。像魅力一样工作。

Connect mysql from console.

从控制台连接 mysql。

use mysql;
show create table mysql.proc;

Then look for commentcolumn. If it's datatype is char, change to text.

然后寻找评论栏。如果它的数据类型是字符,请更改为文本。

You can also use any other gui for making changes.

您还可以使用任何其他 gui 进行更改。

回答by pjcarly

On windows, with XAMPP i managed to fix the issue by going to the directory:

在 Windows 上,使用 XAMPP 我设法通过转到目录来解决问题:

C:\xampp\mysql\binand running the executable mysql_upgrade.exeyou'll find inside, make sure your mysql server is running.

C:\xampp\mysql\bin并运行mysql_upgrade.exe你会在里面找到的可执行文件,确保你的 mysql 服务器正在运行。

回答by user2962854

I use MAMP on mac and failed to upgrade the my databases via command line as suggested above, but it worked when i used MAMP PRO->TOOLS menu options (top of OS X screen) to 'Check', 'Repair' and 'Upgrade' databases.

我在 mac 上使用 MAMP 并且未能按照上面的建议通过命令行升级我的数据库,但是当我使用 MAMP PRO->TOOLS 菜单选项(OS X 屏幕顶部)来“检查”、“修复”和“升级”时它起作用了' 数据库。

I presume that the GUI supplies the underlying CLI tools with the necessary options, so that you don't have to think about what those options need to be (as opposed to running the CLI tools manually).

我认为 GUI 为底层 CLI 工具提供了必要的选项,因此您不必考虑这些选项需要是什么(而不是手动运行 CLI 工具)。

Upgrading my MAMP in this way (via MAMP PRO's GUI Tools) made my (separate) Oracle mysqlWorkbench 6.0 app work just fine with my local MAMP PRO 2.0.5 databases on OS X 10.8.5 (Mountain Lion), which mysqlworkbench had said were corrupt previously (but MAMP's phpmyadmin worked fine on them whilst they were "corrupt", curiously). Now, both mysqlWorkbench 6.0 and MAMP PRO's phpmyadmin tools are both happy, and so am I.

以这种方式(通过 MAMP PRO 的 GUI 工具)升级我的 MAMP 使我的(单独的)Oracle mysqlWorkbench 6.0 应用程序与我在 OS X 10.8.5(Mountain Lion)上的本地 MAMP PRO 2.0.5 数据库一起工作得很好,mysqlworkbench 说是以前腐败(但奇怪的是,MAMP 的 phpmyadmin 在他们“腐败”时对它们工作得很好)。现在,mysqlWorkbench 6.0 和 MAMP PRO 的 phpmyadmin 工具都很满意,我也是。

回答by vivoconunxino

If this happens on a specific query, be aware that this can also happen when you try to use an undefined function.

如果这种情况发生在特定查询上,请注意,当您尝试使用未定义的函数时也会发生这种情况。

回答by Aggelia

Using MAMP PRO (version 2.2) I tried pmking's suggestion and was still getting nowhere. So I edited the two files: /Applications/MAMP/bin/repairMysql.sh /Applications/MAMP/bin/upgradeMysql.sh

使用 MAMP PRO(2.2 版)我尝试了 pmking 的建议,但仍然一无所获。所以我编辑了两个文件:/Applications/MAMP/bin/repairMysql.sh /Applications/MAMP/bin/upgradeMysql.sh

changing 'proot' to 'p' in each. This creates a prompt for the MySQL root password and it worked!

在每个中将“proot”更改为“p”。这会创建一个输入 MySQL root 密码的提示,并且它起作用了!

I hope that helps someone else.

我希望能帮助别人。

回答by Sverre

on debian 6, MySQL 5.1.73-1 (Debian), I had the same problem, and a start and stop helped me.

在 debian 6, MySQL 5.1.73-1 (Debian) 上,我遇到了同样的问题,开始和停止对我有帮助。

/etc/init.d/mysql stop
/etc/init.d/mysql start

not sure what happen, but the problem seems to go away after this quit stop and start, just wanted to add it here, in case others have same problem.

不知道会发生什么,但是在退出停止并启动后问题似乎消失了,只是想在这里添加它,以防其他人遇到同样的问题。

回答by aesede

I had exact same error, and solution was just stupid, so I recommend to look for simple answers before starting to upgrade stuff. In my particular case the problem was I did:

我有完全相同的错误,解决方案很愚蠢,所以我建议在开始升级之前寻找简单的答案。在我的特殊情况下,问题是我做了:

COUNT (id) AS quantity ... # Fails: notice space between COUNT and (

where it should read

它应该在哪里阅读

COUNT(id) AS quantity ... # Works: notice no space between COUNT and (

This happens when you don't use a framework, you could (should) do something like this, in this case with in Laravel5:

当你不使用框架时会发生这种情况,你可以(应该)做这样的事情,在这种情况下,在Laravel5 中:

$users = DB::table('users')->count();