MySQL: could not get mysqldump version
I had this problem, and in my case solved it in another way. Try this:
Open your Console:
mysqldump -u <user> -p <data_base_name> > /home/<user>/<did>/database-dump.sql
For example:
mysqldump -u root -p wp_site > /home/victor_santos/Desktop/database-dump.sql
After there, press Enter and enter user password.
OBS: User must have permission to access and export data from this database.
Related videos on Youtube
user9371654
Updated on September 18, 2022Comments
-
user9371654 over 1 year
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 clickexport
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 thepath to mysqldump tool
to where mysqldump is. I tried to change it to both: /usr/bin/mysqldump /usr/lib/mysql-workbench/mysqldumpAfter 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.15Here 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.
-
Jos about 5 yearsIs there a
loose-local-infile
parameter somewhere in yourmy.cnf
? -
user9371654 about 5 yearsYes. See the last three lines in my post. In my.cnf these 3 lines there:
!includedir /etc/mysql/conf.d/ !includedir /etc/mysql/mysql.conf.d/ [client] loose-local-infile=1
The last two (starting from [client]) I added them manually to allow me load data from files into my tables. -
Jos about 5 yearsParameters that start with
loose-
should be ignored by programs that do not understand them. They should not throw a "unknown variable" warning. Anyway, I would comment out the line first, make a backup, and then uncomment the line while we find out what is going on. -
user9371654 about 5 yearsI removed that line completely. I found it in
my.cnf
anf inmysql.cnf
. I may have added it tomysql.cnf
previously by mistake. Can you confirm to me that it should not exist inmysql.cnf
? Anyways, even after removing that line from both files, I still get the same error.
-
-
Duna over 4 yearsNope, same issue
-
aderchox almost 4 yearsSame issue here with the latest version as well.