I have production server running on Debian 9. I would like to ask you what is safe way to manage MySQL/MariaDB server (on production server).
MySQL/MariaDB server listens only on localhost, because I don't want to be accessible from internet for security reasons.
So if I want something change or look for something, then I have to login into MySQL/MariaDB server using cli and write SQL queries. But I am tired of that.
I would like to ask you what are possibilities or what is the best way to manage MySQL/MariaDB server in safe way and in comfortable way.
I find out some several solutions, but I don't know if they are right, so I write them.
Solution 1
Find some kind of frontend cli software for MySQL/MariaDB server, like Midnight Commander (yes I know that Midnight Commander is like file explorer, but it has that "GUI feel" even it is cli software), but I don't know if that software exists.
Solution 2
Install phpMyAdmin without apache (using -S parameter in PHP) to avoid some security risks, block phpMyAdmin's port using firewall (to be not reachable from internet, only localhost) and connect to phpMyAdmin only via SSH tunneling.
If you know something better, I would be happy for any advice.
What you’re probably going to want is MySQL Workbench, which will work for most use cases, has a nice feature set and easy GUI, and is an industry standard.
P.s.: it works as well with MariaDB, but keep in mind that the passphrase binary encoding used by the Workbench MySQL client doesn’t always play nicely across an SSH tunnel, and may need to be transmitted as plaintext. Not a problem, but requires changing in the Advanced preferences for the client connection.
mycli has ssh transport being developed so hopefully soon.