Search code examples
mariadbsynology

Running mysql_secure_installation on Synology 215J NAS with MariaDb and phpMyAdmin


I have a Synology 215J NAS drive running DSM 6.0. I've installed the MariaDB and phpMyAdmin packages and am able to create/edit databases etc from within phpMyAdmin. However, I've read that to secure the database I should run the mysql_secure_installation binary file. Where can I find this?? I've connected to the NAS via SSH but cannot seem to locate the file.


Solution

  • As Isaac points out, this script is usually installed in /usr/bin. However, what it does is not a lot of stuff, and if you're installing just one server, it's quite easy to do everything that mysql_secure_installation does manually. Here's everything the script does:

    • Set a password for local root accounts (localhost, 127.0.0.1, ::1)
    • Remove other root accounts (disable root logon remotely)
    • Drop the "test" database
    • Flush privileges (ensure the prior changes are reflected in the running server)