percona-xtrabackup wrong mysql socket path
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
percona-xtrabackup (Ubuntu) |
Fix Released
|
High
|
James Page | ||
Xenial |
Fix Released
|
High
|
James Page | ||
Yakkety |
Fix Released
|
High
|
James Page | ||
Zesty |
Fix Released
|
High
|
James Page |
Bug Description
[Impact]
Default socket path for MySQL switched from /var/run/
[Test Case]
sudo apt install percona-xtrabackup mariadb-server
sudo mkdir -p /srv/backup
sudo xtrabackup --backup --target-
Backup fails to connect to mysql with the error in the original bug report
[Regression Potential]
Limited; we missed this and two other compilation flag changes during the original update - the proposed updates re-sync the Ubuntu packaging with the upstream packaging in terms of compilation flags and value.
[Original Bug Report]
percona-xtrabackup was upgraded from 2.2.3-2.1build1.1 to 2.3.7-0ubuntu0.
It appears that MySQL default socket file path has changed in the new version.
After the update my backups started failing with the following:
170402 06:30:04 Connecting to MySQL server host: localhost, user: root, password: not set, port: not set, socket: not set
Failed to connect to MySQL server: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2).
Workaround:
Add the following in /root/.my.cnf or similar:
[client]
socket = /run/mysqld/
Version details:
root@chmaa ~ # lsb_release -rd
Description: Ubuntu 16.04.2 LTS
Release: 16.04
root@chmaa ~ # apt-cache policy percona-xtrabackup
percona-xtrabackup:
Installed: 2.3.7-0ubuntu0.
Candidate: 2.3.7-0ubuntu0.
Version table:
*** 2.3.7-0ubuntu0.
500 http://
100 /var/lib/
2.
500 http://
tags: | added: regression-update |
Changed in percona-xtrabackup (Ubuntu): | |
assignee: | nobody → James Page (james-page) |
description: | updated |
description: | updated |
Hmm so this should be set correctly:
cmake -DBUILD_ CONFIG= xtrabackup_ release -DCMAKE_ INSTALL_ PREFIX= /usr -DMYSQL_ UNIX_ADDR= /var/run/ mysqld/ mysqld. sock \ DWITH_SSL= system -DINSTALL_ MYSQLTESTDIR= /usr/share/ percona- xtrabackup- test -DINSTALL_ MANDIR= /usr/share/ man .
-
Note use of MYSQL_UNIX_ADDR