Bug 1406391

Summary: mysql_install_db does not work when --basedir is specified
Product: Red Hat Software Collections Reporter: Honza Horak <hhorak>
Component: mariadbAssignee: Honza Horak <hhorak>
Status: CLOSED CURRENTRELEASE QA Contact: qe-baseos-daemons
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rh-mariadb101CC: databases-maint, kvolny
Target Milestone: ---Keywords: Patch
Target Release: 3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1466472 (view as bug list) Environment:
Last Closed: 2018-08-23 11:52:16 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1346768, 1406187, 1466472    

Description Honza Horak 2016-12-20 12:43:54 UTC
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.

Comment 2 Honza Horak 2016-12-20 16:56:16 UTC
Also reported upstream:
https://jira.mariadb.org/browse/MDEV-11616

Comment 7 Honza Horak 2018-08-23 11:52:16 UTC
I believe this bug is already fixed in the latest released builds.