Should I check something at the Mariadb installation?
# grep 'mysql’ config.log
$ ./configure --prefix=/usr/local/php7 --enable-huge-code-pages --with-config-file-scan-dir=/usr/local/php7/etc/conf.d --without-pear --enable-bcmath --with-bz2 --enable-calendar --enable-intl --enable-exif --enable-dba --enable-ftp --with-gettext --with-gd --with-jpeg-dir --enable-mbstring --with-mcrypt --with-mhash --enable-mysqlnd --with-mysql-sock=/var/run/mysqld/mysqld.sock --with-mysqli=/usr/local/mysql/bin/mariadb_config --with-pdo-mysql=/usr/local/mysql --with-openssl --enable-pcntl --with-pspell --enable-shmop --enable-soap --enable-sockets --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-wddx --with-zlib --enable-zip --with-readline --with-curl --enable-simplexml --enable-xmlreader --enable-xmlwriter --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data
...
configure:52615: result: /var/run/mysqld/mysqld.sock
configure:52749: checking for mysql_set_server_option in -lmysqlclient
configure:52774: cc -o conftest -I/usr/include -g -O2 -fvisibility=hidden -Wl,-rpath,/usr/local/mysql/lib/ -L/usr/local/mysql/lib/ -L/usr/lib -Wl,-rpath,/usr/local/lib -L/usr/local/lib -Wl,-rpath,/usr/lib/x86_64-linux-gnu -L/usr/lib/x86_64-linux-gnu -lmariadb -ldl -lm -lssl -lcrypto conftest.c -lmysqlclient -lmcrypt -lltdl -lstdc++ -lpng -lz -ljpeg -lcurl -lbz2 -lz -lrt -lm -ldl -lnsl -lxml2 -lz -lm -ldl -lssl -lcrypto -lcurl -lxml2 -lz -lm -ldl -lssl -lcrypto -licui18n -licuuc -licudata -licuio >&5
/usr/bin/ld: cannot find -lmysqlclient
| char mysql_set_server_option ();
| return mysql_set_server_option ();
configure:53081: error: wrong mysql library version or lib not found. Check config.log for more information.
ac_cv_lib_mysqlclient___mysql_set_server_option=no