By default MariaDB comes with a shell script called mysql_secure_installation that allows you to:

But for some reason it isnʼt shipped with the MariaDB 10 version installed through Synologyʼs Package Center. Nothing a few lines of shell script cannot fix. Login to your NAS via SSH and run the following commands:

# Latest MariaDB package version on Synology as of writing is 10.3.27
# Command changed to `mariadb` in MariaDB 10.6.2
mariadb_version="$($mariadb_command --version | grep -oP 'Distrib \K[\d.]+')"

# Get the script matching the installed MariaDB version
wget "${mariadb_version}/scripts/"

chmod +x

# 'basedir' is the installation location of the MariaDB package
./ --basedir=/volume1/@appstore/MariaDB10/usr/local/mariadb10

As always, check any scripts you download from the Internet before running them on your system!