1

I have previously posted this question on Stack Overflow, but have not solved the problem. Hopefully it is not incorrect to post it here in the hope that it will be seen by a some different individuals who have encountered the problem and can explain what is happening and have a solution.

Having used MySQL on a previous laptop running Linux Mint 13 I recently installed it on a newer laptop (also running Mint 13). Although I could carry out a Data Dump via MySQL Workbench a Data Import/Restore fails when it encounters a larger BLOb (of ~1.9 MB) with Error 2006 (HY000) : MySQL server has gone away. The same error is reported if I try to add the BLOb via my Python 2.7 app. After talking with a former colleague I edited /etc/mysyl/my.cnf. The section I changed was:-

[mysqld] 
user        = mysql 
pid-file    = /var/run/mysqld/mysqld.pid 
socket      = /var/run/mysqld/mysqld.sock 
port        = 3306 
basedir     = /usr 
datadir     = /var/lib/mysql 
tmpdir      = /tmp 
lc-messages-dir = /usr/share/mysql 
explicit_defaults_for_timestamp 

to:-

    [mysqld] 
    user        = mysql 
    pid-file    = /var/run/mysqld/mysqld.pid 
    socket      = /var/run/mysqld/mysqld.sock 
    port        = 3306 
    basedir     = /usr 
    datadir     = /var/lib/mysql 
    tmpdir      = /tmp 
    lc-messages-dir = /usr/share/mysql 
    explicit_defaults_for_timestamp 
    max_allowed_packet = 128M 
    net_buffer_length = 32M 
    wait_timeout    = 6000 

   [mysqldump] 
   user            = mysql 
   max_allowed_packet = 128M 
   net_buffer_length = 32M 

After a reboot the Data Import/Restore worked (as did the Python app) but a Data Dump fails with cannot parse version from mysqldump. My former colleague was thrown by this and I am now feeling somewhat confused. Changing /etc/mysql/my.cnf and rebooting every time you want to carry out a different action is not really viable. How should I edit /etc/mysql/my.cnf so that Dumps and Restores work consistently.

Thank you...

  • please delete the SO question. – ypercubeᵀᴹ Oct 27 '15 at 7:58
1

there are two common solution for cannot parse version from mysqldump: the first one you need to make sure path for MySQLDUMP is correct you can check it from the workbench by going to Edit->Preferences->Administrator and the second one the environment variable is not correctly configured on the server.

  • Everything seemed correct and the problem sort of solved itself. I had to put the same OS and same version of MySQL on identical hardware bar the 64-bit rather than the 32-versions. The my.cnf file is somewhat different and everything worked straight off. Whilst I would like to get to the bottom of the issue I have to focus on the 64-bit implementation as it is the way forward. I will have to delve more when I get some free time. Thanks for all suggestions. – MichaelJohn Feb 6 '15 at 10:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.