Copyright © SEP AG 1999-2020. All rights reserved.
Any form of reproduction of the contents or parts of this manual is allowed only with the express written permission from SEP AG. When compiling and designing user documentation SEP AG uses great diligence and attempts to deliver accurate and correct information. However, SEP AG cannot issue a guarantee for the contents of this manual.
- 1 MySQL Backup
- 1.1 MySQL backup fails with mysqldump: Error 2013: Lost connection to MySQL server during query
- 1.2 Problems during MySQL backup if user's password contains special characters – use configuration file to store the password
- 1.3 Shell login of user root is permitted (i.e. on Ubuntu systems), but the variable $HOME does not exist
- 2 See also
MySQL backup fails with mysqldump: Error 2013: Lost connection to MySQL server during query
- MySQL backup fails with
mysqldump: Error 2013: Lost connection to MySQL server during query
- This error typically occurs when backing up MySQL databases to tape devices. The reason for this is the MySQL setting net_write_timeout, which defaults to a value of 60 seconds. It can take longer than 60 seconds to open the tape, but after 60 seconds MySQL database resets the connection while the backup is still in progress.
- Open the option file
/etc/my.cnfand set a higher value for the variable net_write_timeout in section [mysqld] as follows:
[mysqld] ... other options .. net_write_timeout = 180
# mysql -u root -p -e "set global net_write_timeout=180;"
Keep in mind that this setting will reset to its original value during restart if it is not saved in the configuration file.
The current active value can be determined as follows:
# mysql -u root -p -e "SHOW GLOBAL VARIABLES LIKE 'net_write_timeout'" +-------------------+-------+ | Variable_name | Value | +-------------------+-------+ | net_write_timeout | 60 | +-------------------+-------+
Problems during MySQL backup if user's password contains special characters – use configuration file to store the password
- There may be problems during backup if the password of the user, assigned for executing the backups, contains special characters. In general, the use of apostrophes as well as mutated vowels (umlauts) is suppressed in the GUI.
- Store the password (recommended for all MySQL backups) in a special configuration file rather than a task. If a password is stored separately in the configuration file, it will not appear in SEP sesam logging. See 18.104.22.168. Using Option Files for a complete overview about MySQL configuration files on any supported platform. The following example is suitable for Unix and Linux:
- Create a configuration file named my.cnf. In case SEP sesam runs as user root and to ensure that the SEP sesam Client can read it correctly, store this file in
[client] user=root password=mysqlpw
The password will now be read from the configuration file during the backup.
Shell login of user root is permitted (i.e. on Ubuntu systems), but the variable $HOME does not exist
- If the variable $HOME does not exist, then the file my.cnf cannot be found.
- Edit the file <sesam-root>/var/ini/sm.ini and add the following lines at the bottom of the file:
Once you added the required variable, restart SEP sesam service for changes to take effect.