Update database error

Im using Turenas Core 12.1 install official plugin nextcloud(v20.0.6)
when i cheak the system state ,it show the database version is too old(mysql 5.1),it well not be used in next nextcloud version ,so i want to switch the database to MariaDB .
Now i install 10.5.8-MariaDB by pkg .
Then i can't login webpage

(Internal Server Error

The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the server log. )
Can anyone tell me what can i fix it

You most likely had MySQL v5.1 installed and have now installed MariaDB 10.5. As the same are telling you these are two different databases and although they a compatible from the SQL syntax point of view, it doesn’t mean that the database is automatically be transferred/imported. Follow this guide to migrate your data: