Исправление Shaman007, (текущая версия) :
root@host:~# lxc-attach --name web
root@web:~# mysqldump --plugin-dir=/usr/lib/mysql/plugin --user=mysql \--port=3306 --all-databases > test.sql
mysqldump: Got error: 2002: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) when trying to connect
root@web:~#
Исходная версия Shaman007, :
root@:host~# lxc-attach web
lxc-attach: missing container name, use --name option
root@host:~# lxc-attach --name web
root@web:~# mysqldump --plugin-dir=/usr/lib/mysql/plugin --user=mysql \--port=3306 --all-databases > test.sql
mysqldump: Got error: 2002: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) when trying to connect
root@web:~#