dokku / dokku-mariadb

a mariadb plugin for dokku
MIT License
73 stars 26 forks source link

Cannot run `mariadb:connect` and `mariadb:export` commands #129

Closed turicas closed 1 year ago

turicas commented 1 year ago

Description of problem

Cannot run mariadb:connect and mariadb:export commands, it says command not found for mysql and mysqldump, respectively. I checked and both mysql and mysqldump commands are available in the host machine but not in the container - in the service container the names are mariadb and mariadb-dump.

How reproducible

The problem occurs when I execute the following commands:

# dokku mariadb:export myservice
OCI runtime exec failed: exec failed: unable to start container process: exec: "mysqldump": executable file not found in $PATH: unknown

# dokku mariadb:connect myservice
env: ‘mysql’: No such file or directory

Environment Information

         00_dokku-standard    0.30.9 enabled    dokku core standard plugin                                                    
         mariadb              1.34.0 enabled    dokku mariadb service plugin                                                  

How (deb/make) and where (AWS, VirtualBox, physical, etc.) was Dokku installed?:

Using Debian repository.

Temporary fix

I've symlinked the executables and it worked:

container_id=$(dokku mariadb:info myservice | grep 'Id:' | awk '{print $2}')
docker exec -it $container_id ln -s /usr/bin/mariadb-dump /usr/bin/mysqldump
docker exec -it $container_id ln -s /usr/bin/mariadb /usr/bin/mysql

After this, running dokku mariadb:export works but warns:

mysqldump: Deprecated program name. It will be removed in a future release, use '/usr/bin/mariadb-dump' instead
josegonzalez commented 1 year ago

I wonder when this changed in the image....