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.
php -S
introduces security risks (as does phpMyAdmin, which has a long history of vulnerabilities). Listening to localhost with a blocked port is no guarantee. (Facebook discovered that when someone used their "put in a URL and we'll crawl it" Open Graph debugger tool on internal URLs that aren't directly available, but were available to the tool). This is why you're way better off with a client like Sequel Pro (or MySql Workbench, which you've accepted as an answer.)