Description of problem: mysql_install_db does not work when --basedir is specified, even correctly to /opt/rh/rh-mariadb101/root/usr. Version-Release number of selected component (if applicable): #> rpm -q rh-mariadb101-mariadb rh-mariadb101-mariadb-10.1.19-6.el7.x86_64 How reproducible: every-time Steps to Reproduce: 1. # scl enable rh-mariadb101 -- mysql_install_db --rpm --datadir="/var/opt/rh/rh-mariadb101/lib/mysql" --user="mysql" --basedir=/opt/rh/rh-mariadb101/root/usr Actual results: Datadir is not initialized with this error: The following directories were searched: /opt/rh/rh-mariadb101/root/usr/share/english /opt/rh/rh-mariadb101/root/usr/share/mysql/english Expected results: Datadir is correctly initialized. Additional info: This causes troubles in container image, where the basedir option is specified in the configuration.
Also reported upstream: https://jira.mariadb.org/browse/MDEV-11616
In Fedora it is already fixed: http://pkgs.fedoraproject.org/cgit/rpms/mariadb.git/tree/mariadb-install-db-sharedir.patch?id=220a57c9a37a0ccf9a321b4335a54dbcc8d2d5f3
I believe this bug is already fixed in the latest released builds.