I’m having trouble getting my database server working properly after a clean installation. This is on a new Linux Mint system that I set up today.
Here’s what I’ve done so far:
Installed both MySQL client and server packages
Verified the service is running with systemctl
Can access the database through command line interface
But here’s what’s not working:
External tools like MySQL Workbench won’t connect
Testing with netcat to port 3306 gives connection refused errors
Even local connections seem problematic
I’ve tried these troubleshooting steps:
Set bind-address to 127.0.0.1 in config
Disabled firewall completely
Uninstalled and reinstalled the packages
Rebooted the system multiple times
Double checked all configuration files
Removed AppArmor as suggested in some forums
The weird part is that the same setup works fine on other machines in my network, just not on this Linux Mint box. Since this is a fresh install with minimal software, I don’t think other packages are interfering.
Has anyone run into similar connectivity problems with MySQL on Linux Mint? Could this be a distribution specific issue or am I missing something obvious?
Had the same problem when I switched from Ubuntu to Linux Mint last year. MySQL’s socket config was clashing with how Mint starts services. Even though systemctl said it was running, the socket file wasn’t getting created properly in /var/run/mysqld/. Check if mysqld.sock exists there and has the right permissions. Also make sure the mysql user owns /var/lib/mysql and everything inside it. Mint sometimes screws up the ownership during package install. Stop the service completely, delete the socket file if it’s there, then restart. Fixed my connection issues when nothing else worked.
Manual database troubleshooting is a nightmare. I’ve been there way too many times.
You’re wasting hours on config files, service restarts, and port checking when you could just automate the whole database setup and connection management.
I had this exact headache with a client project - needed consistent MySQL setups across different environments. Instead of fighting each system individually, I built an automation workflow that handles database configuration, user permissions, and connection testing all at once.
The workflow checks port availability, configures bind addresses, sets up users with proper host permissions, and runs connection tests from local and remote endpoints. When something breaks, it logs the exact issue and suggests fixes.
This saved me from ever debugging MySQL connectivity issues again. Now I need a database setup? The automation handles everything from installation to connection verification.
You can build this kind of database automation workflow easily at https://latenode.com
u might wanna check the my.cnf file again. sometimes, the settings get reverted or ignored. also, try using mysql -u root -p -h 127.0.0.1 to specify the host directly. good luck!
Run netstat -tlnp | grep 3306 or ss -tlnp | grep 3306 to see what interface MySQL’s actually binding to. If you only see 127.0.0.1:3306, that’s why external connections aren’t working. You said you set bind-address to 127.0.0.1, but you need it set to 0.0.0.0 or just comment it out for external access. Also check your MySQL user permissions - the service might accept connections but users could still be restricted to localhost. Try SELECT user, host FROM mysql.user; to verify this. Linux Mint’s default security config is usually stricter than other distros about network access.
I’ve seen this kind of issue before on fresh Linux Mint setups and it’s often down to MySQL not listening where you expect it to. By default on some Mint/Ubuntu builds, mysqld is configured to listen only on the socket file rather than TCP, so command-line access works but external tools like Workbench fail. Check /etc/mysql/mysql.conf.d/mysqld.cnf and make sure bind-address is set either to 0.0.0.0 (for all interfaces) or your machine’s IP, not just 127.0.0.1. Also confirm with ss -tlnp | grep 3306 that MySQL is actually bound to the port. If not, add skip-networking=0 under [mysqld] and restart the service. On Mint, AppArmor and SELinux aren’t usually the blocker, but mismatched socket vs TCP configuration is common. Since you’ve already tested with firewall off and reinstalled packages, I’d focus on the bind settings and network stack. If local socket connections are flaky too, check the error.log under /var/log/mysql/. Corrupted data files are rare on fresh installs but if you do suspect that (e.g., database won’t start cleanly or logs show InnoDB corruption), you can run recovery tools like Stellar Repair for MySQL to repair the underlying database files and confirm it’s not data-related.