Connecting to mysql remotely

I'm having a hard time connecting to mysql server on my own phsycial server from another computer on the same network. I use ssh to communicate remotely with my server inside and outside the server's network. I can connect to mysql using phpmyadmin and see my databases and their records through a browser but can't using client code or software on my computer. I want to be able to run a script on my computer and to instantly see what's in a database without having to type phpmyadmin in url sign into phpmyadmin and go to the database and click on a table. I think why the phpmyadmin way works, and not my own code, is cause it runs on my server and not my computer. I've wasted so much time trying to figure out how to connect remotely and with different software.

What I've done:
I've disabled the firewall on myserver(don't worry I won't keep it that way). I use webmin to manage my server and when I go to mysql datbase server within webmin and hit variables the bind_address variable is equal 127.0.0.1. Well I know I need to change that to 0.0.0 or whatever to allow remote access.

The problem is my.cnf doesn't have anything in it. Well almost nothing. When I hit mysql server configuration it says "could not find [mysqlid] section in my.cnf". Attached is the contents of the my.cnf in /etc/mysql/my.cnf. How do I change the bind address? I'm almost certain that will solve my problem. From online I see that everyone's my.cnf looks very different and has variables inside of it. Mine doesn't. Maybe cause I'm running the latest mysql server. 5.6.25-0ubuntu0.15.04.1

I have attached 3 files, a python script on my computer that trys to connect to a mysql database remotely, that script's output, and the contents of my.cnf file.

PS. I posted this on another form but no one responded. I hope you guys can help :)
my.cnf
pythonscript
pytonscriptoutput

You need to look in the two folders that are "Included" in the my.cnf.

it's the new way of building config files. instead of one flat file, you include all the stuff in a directory.

/etc/mysql/conf.d/ <--- in here
and
/etc/mysql/mysql.conf.d/ <--- and in here.

My script connected! See I didn't know that. I had a later version so I thought that is why my config looked different than most on the internet, but I didn't know where to look or what to do. So now with your help, I found the bindaddress setting in /etc/mysql/mysql.conf.d. Anyway I'm a noob who just got a little bit smarter. Thanks Qain!! I really need to make this my main forum. You guys are just to great.

1 Like