Don't guess basedir in mysql_config; we place it under _libdir because of multilib conflicts, so use rather configured @prefix@ path directly. diff -up mariadb-10.0.13/scripts/mysql_config.sh.patch32 mariadb-10.0.13/scripts/mysql_config.sh --- mariadb-10.0.13/scripts/mysql_config.sh.patch32 2014-08-13 17:28:51.174776518 +0200 +++ mariadb-10.0.13/scripts/mysql_config.sh 2014-08-13 17:32:18.205275028 +0200 @@ -76,8 +76,7 @@ get_full_path () me=`get_full_path $0` -# Script might have been renamed but assume mysql_config -basedir=`echo $me | sed -e 's;/bin/mysql_.*config.*;;'` +basedir='@prefix@' ldata='@localstatedir@' execdir='@libexecdir@'