Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: Dump SQL Backup (MariaDB) Error #790

Open
datgausaigon opened this issue May 19, 2024 · 4 comments
Open

BUG: Dump SQL Backup (MariaDB) Error #790

datgausaigon opened this issue May 19, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@datgausaigon
Copy link

Hi,
I use DbGate 5.2.9 beta-2
When I backup my MariaDB Database by "Backup/export SQL dump" (The typo should be Backup/Export SQL Dump). I got the error.

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

Screenshot 2024-05-19 at 17 30 15

@ProjectInfinity
Copy link
Collaborator

Try starting dbgate from the terminal to see if there's any useful output.

This error doesn't stem from dbgate but instead underlying software.

Giving the error a little look up I found a few things.
One suggestion is that the issue is most likely solved when running a MySQL upgrade.

This can be done with mariadb-upgrade or mysql_upgrade like so mysql_upgrade -u root -p.

@datgausaigon
Copy link
Author

Hi @ProjectInfinity , Thanks for your instructions.

In Terminal I got "ER_CANNOT_LOAD_FROM_TABLE_V2"

My log in Terminal:

{"pid":33275,"caller":"requirePlugin","name":"databaseConnection","level":30,"msg":"Loading module dbgate-plugin-mysql from /Applications/DbGate.app/Contents/Resources/app.asar/packages/plugins/dbgate-plugin-mysql/dist/backend.js","time":1716175807925}
{"pid":33275,"caller":"dbAnalyser","err":{"code":"ER_CANNOT_LOAD_FROM_TABLE_V2","errno":1728,"sqlState":"HY000","sqlMessage":"Cannot load from mysql.proc. The table is probably corrupted","sql":"\nSHOW PROCEDURE STATUS WHERE Db = 'mydatabase_OTgzNmFlZmY4ZTcyMj_dbname'\n"},"level":50,"msg":"Error running analyser query","time":1716175808990}
{"pid":33275,"caller":"dbAnalyser","err":{"code":"ER_CANNOT_LOAD_FROM_TABLE_V2","errno":1728,"sqlState":"HY000","sqlMessage":"Cannot load from mysql.proc. The table is probably corrupted","sql":"\nSHOW FUNCTION STATUS WHERE Db = 'mydatabase_OTgzNmFlZmY4ZTcyMj_dbname'\n"},"level":50,"msg":"Error running analyser query","time":1716175809142}

In Jet Brains DataGrip, I must add "--column-statistics=0" for dump sql backup

Screenshot 2024-05-20 at 10 39 59

@datgausaigon
Copy link
Author

Hi @ProjectInfinity @janproch

I have found the reason. That's because MariaDB/MySQL Server had a previous upgrade/downgrade. This problem will occur.

ATAL ERROR: Version mismatch (10.7.7-MariaDB -> 10.5.25-MariaDB): Trying to downgrade from a higher to lower version is not supported!

In the remote database server we need to reconfigure. As you instructed with the command mariadb-upgrade or mysql_upgrade. But sometimes this command cannot be run with some Database Server Production.

With other Database IDEs like Jet Brains Data Grip for example, they allow passing arguments to the sql dump command. Can I request a new feature, the ability to add arguments when using Backup Export/Import with SQL Dump like Data Grip does?

For example, in my case, I can add the argument --column-statistics=0 to handle it.

And we can add other parameters to make DbGate's SQL Dump more flexible.

331935779-d0235f50-e4fd-4aec-96f5-80b5cfc6240b

@ProjectInfinity
Copy link
Collaborator

Thanks for the feedback. Perhaps being able to set dump arguments manually is a good workaround for those who have issues like yours.

@janproch janproch added the bug Something isn't working label May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants