backup your all databases including cwp databases and reinstall cwp with this commands :
cd /usr/local/src
wget http://centos-webpanel.com/cwp-latest
sh cwp-latest -d mariadb
this will install latest version of mariadb
after that restore the database backup
If you want to fresh install cwp with mariadb (latest) then also use this commands :
cd /usr/local/src
wget http://centos-webpanel.com/cwp-latest
sh cwp-latest -d mariadb
I'll recommend you to freshly install cwp with mariadb