This doesn't seem like an osTicket question... I would think that you would get a better answer via MariaDB support.
Of course if you really need to do something like this, you could always:
back up the server.
export all your databases.
remove the old mariaDB.
install the new mariaDB.
restore the databases to the new DB server.