1
MariaDB container throws error with mysqldump when using one-line command
Post Body
I have the official MariaDB container running on 10.7.3-focal. When I use mysqldump
within its bash environment it works:
user@server:~$ docker exec -it mariadb bash
root@ee8b55b1b2cd:/# mysqldump -u root -pPASSWORD database > /var/lib/mysql/database.sql
But when I try to use it in one line, it throws an error: ``` user@server:~$ docker exec -it mariadb mysqldump -u root -pPASSWORD database > /var/lib/mysql/database.sql
Returns this error
-bash: /var/lib/mysql/database.sql: No such file or directory ```
I have tried giving the command privilege and manually setting root user, via --privileged
and -u root
respectively. Does anyone have any suggestions?
Post Details
We try to extract some basic information from the post title. This is not
always successful or accurate, please use your best judgement and compare
these values to the post title and body for confirmation.
- Posted
- 2 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/docker/comm...