Ask Your Question
0

mysql server has gone away

asked 2016-10-06 18:51:09 +0100

EasyTrieve gravatar image

updated 2016-10-06 18:52:13 +0100

I sometimes randomly get: "mysql server has gone away" when connecting LibreOffice Base to MySQL. I must reestart Base before I can proceed.

I'm using:

  • OS: Debian 8.6 (Jessie stable)
  • Database server: MariaDB 10.1 MySQL Server (the most recent version)
  • App: LibrieOffice Base 5.2.2.2 (the most recent version)
  • Extension: mysql connector 1.0.4_3 ("MySQL Native Connector for Linux for 4.2 and 4.3") (the most recent version)

Normally with database connectors there is a place to set up connection parameters. One such parameter in a connector I've used is "keep-alive" which fixed this behavior for me before.

But I'm not sure where to set up any connection parameters for this extension.

Furthermore, I don't know who produced or supports this connector. (See: LibreOffice | Base | Tools | Extension Manager | Get more extensions online... | Extensions | Base-extensions | MySQL Native Connector for Linux for 4.2 and 4.3). The only reference there is to: http://www.documentfoundation.org/ which is just a generic home.

Any help is much appreciated.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2016-10-06 22:08:43 +0100

EasyTrieve gravatar image
  1. Stop your MySQL server, (In linux: services mysql stop),
  2. in /etc/my.cnf check and possibly increase the value of wait_timeout. Mine was set at 600 (seconds, or 10 minutes) but you can set it much higher, and MySQL says the "default" is 28800 (or 480 minutes, = 8 hours).
  3. Restart your MySQL server, (In linux: services mysql start),

from: http://piwik.org/faq/troubleshooting/...

. "The MySQL server has gone away has two main causes and solutions:

Server timed out and closed the connection. To fix, check that “wait_timeout” mysql variable in your my.cnf configuration file is large enough.

Server dropped an incorrect or too large packet. If mysqld gets a packet that is too large or incorrect, it assumes that something has gone wrong with the client and closes the connection. To fix, you can increase the maximal packet size limit “max_allowed_packet” in my.cnf file, eg. set max_allowed_packet = 128M, then sudo /etc/init.d/mysql restart."
edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2016-10-06 18:51:09 +0100

Seen: 397 times

Last updated: Oct 06 '16