Reputation: 1139
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:
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?
Upvotes: 48
Views: 37556
Reputation: 31
C:\Program Files\MariaDB 10.6\bin>mysql_upgrade --force -u root -p
This force upgrade worked for me.
Upvotes: 0
Reputation: 6253
If this happens on a specific query, be aware that this can also happen when you try to use an undefined function.
Upvotes: 1
Reputation: 171
This should do the trick:
mysql_upgrade -uroot -p --force
You may need to specify the full path for command if mysql it's not in the shell's search path.
On Debian 6 it should be loaded with:
/usr/bin/mysql_upgrade -uroot -p --force
On Mac's MAMP the default path is:
/Applications/MAMP/Library/bin/mysql_upgrade -uroot -p --force
On Windows it'll be where MySQL is installed and contained in the bin subdirectory. By default it should be located at:
"C:\Program Files\MySQL\MySQL Server\[*CHANGE TO MySQL SERVER*]\bin\mysqladmin" -u root shutdown
Original resource: How to Resolve MySQL Error Code: 1548 Cannot load from mysql.proc. The table is probably corrupted
Upvotes: 2
Reputation: 1874
Wow, i just go to C:\xampp\mysql\bin and run mysql_upgrade.exe
It repair itself and now everithing is working great.
Upvotes: 0
Reputation: 5703
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 Laravel 5:
$users = DB::table('users')->count();
Upvotes: 0
Reputation: 426
On windows, with XAMPP i managed to fix the issue by going to the directory:
C:\xampp\mysql\bin
and running the executable mysql_upgrade.exe
you'll find inside, make sure your mysql server is running.
Upvotes: 2
Reputation: 1470
if you're on Unix based (like Ubuntu) you can try this :
sudo ./mysql_upgrade -uroot -p
like Bimal suggested.
Upvotes: 0
Reputation: 99
This probably happens when the changes in schema required different versions of mysql server.
To fix this, follow the line of codes below:
mysql_upgrade -uroot -p --force
/usr/bin/mysql_upgrade -uroot -p --force
Complete details of post will find here: Cannot load from mysql.proc. The table is probably corrupted
Upvotes: 0
Reputation: 2472
I got this error, when I had a syntax error in my SQL query in a join.
I did
JOIN shops ON s (...)
instead of the correct
JOIN shops s ON (...)
This error was really confusing, I don't know what this has to do with mysql.proc, but fixing the query fixed the problem. None of the above solutions worked for obvious reasons.
Upvotes: 0
Reputation: 224
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.
This answer is based on changing data type for comment column. And works like charm.
Connect mysql from console.
use mysql;
show create table mysql.proc;
Then look for comment column. If it's datatype is char, change to text.
You can also use any other gui for making changes.
Upvotes: 2
Reputation: 1388
on debian 6, MySQL 5.1.73-1 (Debian), I had the same problem, and a start and stop helped me.
/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.
Upvotes: 0
Reputation: 1
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
changing 'proot' to 'p' in each. This creates a prompt for the MySQL root password and it worked!
I hope that helps someone else.
Upvotes: 0
Reputation: 11
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.
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).
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.
Upvotes: 1
Reputation: 6784
This happens due to schema changes required for different server versions.
mysql_upgrade -uroot -p
will filx the issue.
Sometimes you require to uninstall server and clean its data directory. And re-install to make a fresh copy of data files.
Upvotes: 0
Reputation: 1234
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.
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.
Upvotes: 4
Reputation: 457
I'm using MySQL trough MAMP Pro, and Kevin's answer didn't work for me. Yes, I had to do a mysql upgrade BUT I had to use the following commands on the Terminal:
/Applications/MAMP/bin/repairMysql.sh
/Applications/MAMP/bin/upgradeMysql.sh
This worked for me. Hope this can be helpful to somebody else..
Upvotes: 11
Reputation: 11662
I'm using MySQL version 5.5.9 on MAC. I fixed this problem by running:
mysql_upgrade -uroot -p
Upvotes: 93