I use MySQL workbench 6.3 on Ubunut 18 using MySQL server 8+.
I need to backup my database from the workbench. When I click on Data export
I select the scheme and make sure all the tables needed are checked. I choose the file path where I want to export the backup (external hard drive). I click export
but I get error saying:
Could not get mysqldump version Workbench was unable to get mysqldump version. Please verify the log for more information
Please note that I first get warning syaing the existing data will be overwritten (I deleted old backup but I am saving the new one under same name). Although the old files are not there, I click ok. But still the backup does not work in both types (self-contained sql file or dump project files).
How to solve the issue?
This post have similar problem. It suggest going to Edit
-> Preferences
-> Administration
and to change the path to mysqldump tool
to where mysqldump is. I tried to change it to both:
/usr/bin/mysqldump
/usr/lib/mysql-workbench/mysqldump
After each change, I close and open the MySQL workbench. Nothing solve the issue.
Note, this is the result for locating mysqldump
.
$ locate mysqldump
/etc/mysql/conf.d/mysqldump.cnf
/usr/bin/mysqldump
/usr/bin/mysqldumpslow
/usr/lib/mysql-workbench/mysqldump
/usr/share/man/man1/mysqldump.1.gz
/usr/share/man/man1/mysqldumpslow.1.gz
Please note that the export worked with me yesterday. I did not change anything apart from shutting down my device and start it.
Please note that I also upgraded both MySQL workbench and MySQL server. I did not remove the old MySQL server but when I check the version using: SHOW VARIABLES LIKE "%version%";
It see the new version: 8.0.15
Here is the MySQL workbench paths I see:
Also, when I go to /usr/bin/
and execute: mysqldump --version
I get:
mysqldump: [Warning] unknown variable 'loose-local-infile=1'.
mysqldump Ver 8.0.15 for Linux on x86_64 (MySQL Community Server - GPL)
Finally, the loose-local-infile=1
is an entry I entered in /etc/mysql/my.cnf
to be able to load data from local files into my database.
Please, help me solve my problem. I need to backup my databases to do some changes.
I had this problem, and in my case solved it in another way. Try this:
Open your Console:
For example:
After there, press Enter and enter user password.
It seems like a problem with MySQL workbench 6.3 version. When I removed it, and installed the newer version MySQL workbench 8, the problem disappeared.
For me it was related to
.my.cnf
file under/home/user/
because when the Workbench was trying to get to the specifics of the file, it had been overwritten (by some other app which uses same configuration).Run
mysqldump --version
and if it says :mysqldump: [ERROR] Found option without preceding group in config file /home/user/.my.cnf at line X!
then you can just rename the .my.cnf file with app_.my.cnf for later usage.
Run Workbench - it should work.
After running:
Restart MySQL workbench and re-try the export. It will work now.
The problem is due to the permissions on the
/etc/my.cnf
file. If you runmysql --version
in a console, it gives the warning:What you have to do is change the permissions of that file:
Fixing the permissions should stop the warning from appearing.