'Tables could not be fetched - Error loading schema content
I open workbench and connect to a local database on XAMPP and when open the connection the schema show the error message:
"tables could not be fetched"
Solution 1:[1]
run this command on terminal
sudo /opt/lampp/bin/mysql_upgrade
Solution 2:[2]
run this command on terminal
mysql_upgrade -u root -p
Solution 3:[3]
For XAMPP, this worked for me - run this on terminal:
sudo /Applications/XAMPP/xamppfiles/bin/mysql_upgrade
Disconnect then reconnect to your db.
Solution 4:[4]
First, locate the directory of which Xampp is installed at. In linux you can just type this in a terminal:
whereis xampp
In my case (btw I use arch, jk) it was located at /opt/lampp/bin . If you're using windows, you may find it under a different location, like in C:\Program Files\xampp\bin
Next, locate the file mysql_upgrade and execute it as an administrator or a sudo.
If you're using Linux:
cd /opt/lampp/bin
then sudo ./mysql_upgrade
According to MySQL documentation:
Each time you upgrade MySQL, you should execute mysql_upgrade, which looks for incompatibilities with the upgraded MySQL server: It upgrades the system tables in the mysql schema so that you can take advantage of new privileges or capabilities that might have been added. It upgrades the Performance Schema, INFORMATION_SCHEMA, and sys schema. It examines user schemas.
So I believe mysql_upgrade should resolve the problem. It worked for me before.
More on mysql_upgrade here:
Solution 5:[5]
That's because the latest XAMPP use MariaDB and MYSQL Workbench is using MYSQL Database, so they are not fully compatible, raising that error for example.You can try to downgrade to some of the previous XAMPP versions.
Solution 6:[6]
For MacOS users:
sudo /Applications/XAMPP/bin/mysql_upgrade
Solution 7:[7]
I created another Connection in MySQL workbench, and the fetching problem for me was resloved.
Solution 8:[8]
I did have this problem today, the reason is:
Error Code: 1356 View 'test.xyz' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
After dropping those view (actually those views) the error was solved.
currently working with MySQL Workbench 8.0.28, and MySQL 8.0.28.
Solution 9:[9]
for macOS users run this on terminal: sudo /Applications/XAMPP/bin/mysql_upgrade this worked for me
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Anh Tu?n Lê |
Solution 2 | jsina |
Solution 3 | |
Solution 4 | Alduin The Khajiiti Nord |
Solution 5 | likos79 |
Solution 6 | Aleti |
Solution 7 | |
Solution 8 | Luuk |
Solution 9 | maddgerald |