you have established that you need to use a different version of mariadb and for that pointing the the right socket, and this is done by using localhost:/var/lib/mysql/mariadb105.sock on joomla 4
Thanks for the information.
The solution should not be looked for if Sme Server used newer databases in the standard installation, or in the upgrade it was possible to upgrade with the "yum" command.
For example: yum update mariadb or yum update mysql
In which configuration file does Joomla indicate the use of the mysql command or the mariadb database, it has not yet been found. We'll keep looking.
Joomla 3 works perfectly with mariadb 10.5. This is checked on another server (not SmeServer).
Virtual temporary servers are used for the migration process. Only after verification, everything is transferred to the working server.