Follow this.: https://wiki.termux.com/wiki/MariaDB
If don't works, try:
killall mariadbd
rm -rf $PREFIX/var/lib/mysql/*
mysql_install_db --user=root --auth-root-authentication-method=normal --datadir=${PREFIX}/var/lib/mysql
mysqld_safe -u root &