--- /usr/portage/dev-db/mariadb/mariadb-10.4.6.ebuild	2019-07-08 16:39:44.000000000 +0300
+++ /var/db/repos/localrepo/dev-db/mariadb/mariadb-10.4.6.ebuild	2019-07-21 23:25:49.128921099 +0300
@@ -62,6 +62,7 @@
 	"${MY_PATCH_DIR}"/20024_all_mariadb-10.2.6-mysql_st-regression.patch
 	"${MY_PATCH_DIR}"/20025_all_mariadb-10.2.6-gssapi-detect.patch
 	"${MY_PATCH_DIR}"/20035_all_mariadb-10.3-atomic-detection.patch
+	"$FILESDIR"/mariadb-10.4.6-fix-path.patch
 )
 
 # Be warned, *DEPEND are version-dependant
@@ -907,8 +908,7 @@
 	[[ -f "${cmd}" ]] || cmd=( "${EROOT}/usr/bin/mysql_install_db" )
 	cmd+=( "--basedir=${EPREFIX}/usr" ${options} "--datadir=${ROOT}/${MY_DATADIR}" "--tmpdir=${ROOT}/${MYSQL_TMPDIR}" )
 	einfo "Command: ${cmd[*]}"
-	su -s /bin/sh -c "${cmd[*]}" mysql \
-		>"${TMPDIR}"/mysql_install_db.log 2>&1
+	/bin/sh -c "${cmd[*]}" >"${TMPDIR}"/mysql_install_db.log 2>&1
 	if [[ $? -ne 0 ]]; then
 		grep -B5 -A999 -i "ERROR" "${TMPDIR}"/mysql_install_db.log 1>&2
 		die "Failed to initialize mysqld. Please review ${EPREFIX}/var/log/mysql/mysqld.err AND ${TMPDIR}/mysql_install_db.log"