I installed mysql
in a container Dockerfile as following:
RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
RUN yum install -y mysql
When I run mysql --version
or /usr/bin/mysql --version
from the app inside the container I get the error:
mysql: command not found
or
/usr/bin/mysql: No such file or directory
Here is what I tried to debug it:
-
I tried adding mysql to PATH but that resulted in the same error:
RUN export PATH="/usr/bin/mysql:$PATH"
-
I ran
rpm -qa |grep mysql
to get the name of the package, and I got the following:mysql-common-8.0.36-1.module+el8.9.0+21207+6c20cb3d.x86_64
mysql-8.0.36-1.module+el8.9.0+21207+6c20cb3d.x86_64
-
I listed everything inside the package with
find /usr -name "mysql*"
:/usr/bin/mysql
/usr/bin/mysql_config_editor
/usr/bin/mysqladmin
/usr/bin/mysqlbinlog
/usr/bin/mysqlcheck
/usr/bin/mysqldump
/usr/bin/mysqlimport
/usr/bin/mysqlpump
/usr/bin/mysqlshow
/usr/bin/mysqlslap
/usr/lib64/mysql
/usr/share/doc/mysql-common
/usr/share/licenses/mysql-common
/usr/share/man/man1/***
/usr/share/mysql
Everything looks correct and I am lost to identify why I cannot use mysql inside my app. Any help is appreciated.