docker-mysql-backup-s3
docker-mysql-backup-s3 copied to clipboard
Backup doesn't work?
Hi,
Not really sure what happened but just run the docker run
to install it, went into the container and run ./backup
and got this:
bash-4.3# ./backup
Unknown suffix '-' used for variable 'port' (value '-u')
mysqldump: Error while setting value '-u' to 'port'
Aha, for some reason MYSQL_PORT wasn't set. So I did export MYSQL_PORT="3306"
but not sure if that will permanently fix it.
Now currently dealing with mysqldump: Got error: 2002: "Can't connect to local MySQL server through socket '/run/mysqld/mysqld.sock' (2)" when trying to connect
and mysqldump: Got error: 2003: "Can't connect to MySQL server on '127.0.0.1' (111)" when trying to connect
Doesn't seem like localhost
or 127.0.0.1
are working.
@vitaliatklood in Docker container localhost
or 127.0.0.1
link to yourself and mysql server did not run there. I think you must set some hostname where mysql is running (name of container or service in docker compose).