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…
Best Answer
there are two common solution for
cannot parse version from mysqldump
: the first one you need to make sure path forMySQLDUMP
is correct you can check it from the workbench by going toEdit->Preferences->Administrator
and the second one the environment variable is not correctly configured on the server.