1

In workbench it shows tables, stored procedures, views could not be fetched but all tables, views & stored procedures are present and I can use them too.

I get data also in my project which is live. Not a problem now but could a future threat.

Here it is

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
CoderNaeem
  • 21
  • 1
  • 5

4 Answers4

1

I've just had your same problem and I found that in my Workbench I had this message:

Error loading schema content     
Error Code: 1356 View 'view_name' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them

I just saved the creation script of that view in a file and dropped it.

Then I refreshed the schema and the error was gone ;)

Hope it helps in your case!

Jorge
  • 113
  • 1
  • 8
  • As an SQL amateur, it would be very helpful if you could explain how to save the "creation" script for a view? From your answer it doesn't sound like you actually did anything with that creation script, is it generated automatically when you drop the view and then refresh the schema (ie. saving it was just for backup purposes?)? – Sheldonfrith Oct 28 '21 at 16:56
0

Had the same issue once, I attempted the following -

  • Check your settings(SQL Editor tab) in workbench, check for DBMS Read Time Out | DBMS Connection Keep-Alive Interval). Set it for a longer time.
  • Check if you have version mismatch between MySQL and MySQL Workbench.
  • Keeping the connection alive, try opening a second connection, open a few tabs and execute some queries on that tab((simply opening a second connection with empty tabs didn't work). Then closing the initial connection, but not the second, and exiting from workbench.).
Kum
  • 333
  • 7
  • 20
  • Thanks for the help..Tried everything you mentioned. But no change. – CoderNaeem Dec 12 '19 at 09:06
  • Ohh. No problem. Have you recently upgraded your system? Is this the first time issue? How was it earlier? – Kum Dec 12 '19 at 13:43
  • Nope i dint went through any system upgrade (Thou I updated it two weeks ago). I facing this problem since a week i guess. I thought it must be a temporary issue at first but its permanent now. – CoderNaeem Dec 13 '19 at 05:33
0

Have you tried anything in here? Tables could not be fetched - Error loading schema content

I use XAMPP to connect to MySQL, and I needed to run this in terminal:

sudo /Applications/XAMPP/xamppfiles/bin/mysql_upgrade

There are other answers in there, as well.

0

If you are using Xampp go to C:\xampp\mysql\bin and double click on mysql_upgrade.exe. It should open and run the script in a terminal.

Then restart your mysql on the control panel, and restart mysql workbench.

It worked for me.