MySQL: could not get mysqldump version

13,311

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.

Share:
13,311

Related videos on Youtube

user9371654
Author by

user9371654

Updated on September 18, 2022

Comments

  • user9371654
    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 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:

    enter image description here

    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
      Jos about 5 years
      Is there a loose-local-infile parameter somewhere in your my.cnf?
    • user9371654
      user9371654 about 5 years
      Yes. 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
      Jos about 5 years
      Parameters 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
      user9371654 about 5 years
      I removed that line completely. I found it in my.cnf anf in mysql.cnf. I may have added it to mysql.cnf previously by mistake. Can you confirm to me that it should not exist in mysql.cnf? Anyways, even after removing that line from both files, I still get the same error.
  • Duna
    Duna over 4 years
    Nope, same issue
  • aderchox
    aderchox almost 4 years
    Same issue here with the latest version as well.