MySQL → How to work around Error 10061

Tony Mucci
Code Kings

--

So if you get a error 10061 while trying to connect to a MySQL DB on an Ubuntu Server this is how you fix this error

  1. SSH into your server
  2. Vim or Nano into /etc/mysql/my.cnf
  3. Once inside this file, find the line that looks like this:
bind-address = 127.0.0.1

4. Change this to:

bind-address = 0.0.0.0

5. Save your changes

6. Restart Mysql

If successful, you should now be able to log into your MySQL from a remote location. This make it so your server now listens to ALL network connections to your MySQL server, not just localhost. If you are worry about security and only want an approved IP, simply use a valid IP address instead of 0.0.0.0.

Happy Coding!

--

--

Tony Mucci
Code Kings

Co-founder of SimpliCourt, dree, My Company Tools, and Eklect Enterprises