What's new

Remote connection to SQL database

tnvarmint

Verified Member
10
2020
0
I was finally able to get my server connecting publicly and now I would like to be able to allow my son to connect to the SQL database remotely from his apartment. We tried simply changing the Hostname / IP in HeidiSQL to my external IP and got the error "Host '192.168.2.1' is not allowed to connect to this MySQL server". This is my default gateway.

I am assuming that this is a user issue of some sort but am not sure. I have opened up port 3306 on my router and it is showing open. Anyone have a tutorial on how to set up the remote connection?
 

tnvarmint

Verified Member
10
2020
0
Got this fixed also. For those curious and not super knowledgeable with SQL, there is a query you have to run to grant access to the IP you are remote connecting from.

Code:
GRANT ALL PRIVILEGES ON *.* TO 'root'@'IP Connecting from' IDENTIFIED BY 'Pasword of your SQL database';

Hope this helps someone in the future.
 
Top