It appears that there is a problem with your mysql/mariadb configuration. Has any modification to any of them been made since installation, or is this a new installation?
new installation
Review the installation instructions and make sure the Mariadb configuration , especially Step 7, were done correctly.
https://github.com/D-codE-Hub/ERPNext-installation-Guide/blob/main/README.md