# Remote Connection with MYSQL

**URL:** <https://forum.inductiveautomation.com/t/remote-connection-with-mysql/5297>\
**Category:** Archived Topics\
**Created:** [October 19, 2012, 8:10pm UTC](https://forum.inductiveautomation.com/t/remote-connection-with-mysql/5297 "2012-10-19T20:10:56Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![tamerplc](https://avatars.discourse-cdn.com/v4/letter/t/d78d45/32.png) [@tamerplc](https://forum.inductiveautomation.com/u/tamerplc)\
**Post date:** [October 19, 2012, 8:10pm UTC](https://forum.inductiveautomation.com/t/remote-connection-with-mysql/5297/1 "2012-10-19T20:10:56Z")

</div>

Hi,  
I have two PC each one have Ignition and MYSQL DB. As per attached(1) Diagram .  
1- when i try to define MYSQL(1) in Ignition(2) it give me fault jdbc:mysql://192.168.3.3:3306/test  
and same when i defined MYSQL(2) in ignition (1) jdbc:mysql://192.168.3.2:3306/test  
I don’t know .Is there any trick to do this inside MYSQL??.I still new in DB.Please advise and give me steps to do this.

Actually i have one project with 30 remote sites and i need to collect data from these site. And my plan to install Ignition (Vision)+OPCUA+SQL Module+ opc-com in each site and we will use store-forward Engine to save the data if the connection failed between each site and Main computer(Hub And Spoke [inductiveautomation.com/prod … ubandspoke](http://www.inductiveautomation.com/products/ignition/architecture/hubandspoke))  
. as per attached(2) Layout.

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/5/59a832379cfb06d865633d6bcefd0391bafa7c9f.jpg)  
  
 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/c/cf20fc223540bb371d92e194715dc7ea6c088516.jpg)

---

<div class="post-metadata">

**Author:** ![Greg.Buehler](https://avatars.discourse-cdn.com/v4/letter/g/ecc23a/32.png) [@Greg.Buehler](https://forum.inductiveautomation.com/u/Greg.Buehler)\
**Post date:** [October 19, 2012, 8:19pm UTC](https://forum.inductiveautomation.com/t/remote-connection-with-mysql/5297/2 "2012-10-19T20:19:39Z")

</div>

If I understand your post: you can connect to the local MySQL database, but the remote connection fails?

Check the ‘my.cfg’ file for the following options:

```auto
bind-address = 0.0.0.0
# skip-networking
```

You need to make sure that ‘bind-address’ is set to 0.0.0.0 or it will deny all other connections, also ‘skip-networking’ must be either deleted or commented out or it will not start listening on any TCP/IP interfaces.

---

<div class="post-metadata">

**Author:** ![tamerplc](https://avatars.discourse-cdn.com/v4/letter/t/d78d45/32.png) [@tamerplc](https://forum.inductiveautomation.com/u/tamerplc)\
**Post date:** [October 19, 2012, 8:42pm UTC](https://forum.inductiveautomation.com/t/remote-connection-with-mysql/5297/3 "2012-10-19T20:42:18Z")

</div>

yes, I can connect to Mysql Locally through Ignition. But remotely from Ignition to otheR Mysql which already installed on other computer .it gave me fault. where i can find my.cnf  
Sorry i just start.Thanks Gerg

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [October 19, 2012, 8:52pm UTC](https://forum.inductiveautomation.com/t/remote-connection-with-mysql/5297/4 "2012-10-19T20:52:41Z")

</div>

You can find it sometimes by running the following command:`locate my.cnf`Make sure the bind address is correct and the firewall is not blocking port 3306.

---

<div class="post-metadata">

**Author:** ![tamerplc](https://avatars.discourse-cdn.com/v4/letter/t/d78d45/32.png) [@tamerplc](https://forum.inductiveautomation.com/u/tamerplc)\
**Post date:** [October 19, 2012, 10:49pm UTC](https://forum.inductiveautomation.com/t/remote-connection-with-mysql/5297/5 "2012-10-19T22:49:14Z")

</div>

i found the file My.ini in C:\ProgramData\MySQL\MySQL Server 5.5\my.ini  
also, from Workbench \>\>Server administration\>\> Configuration (attached)  
where i can write the command?.  
i will delete my SQL connect. then can you inform me the correct steps to configure DB connection in both computer  
1st pc IP 192.168.3.2 ,2nd Pc 192.168.3.3  
😊 thanks  
Tamer

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/5/5bd4c3a18152ee3d701fd67a3f0903eb36168473.png)

---

<div class="post-metadata">

**Author:** ![gnguyen](https://avatars.discourse-cdn.com/v4/letter/g/41988e/32.png) [@gnguyen](https://forum.inductiveautomation.com/u/gnguyen)\
**Post date:** [October 20, 2012, 9:15am UTC](https://forum.inductiveautomation.com/t/remote-connection-with-mysql/5297/6 "2012-10-20T09:15:43Z")

</div>

Hi,

This happen also when the user (set up in the database connexion on the gateway) is not allowed to connect remotely.  
To correct this, you must connect to the remote mysql workbench and set the user right.  
Hope this help.

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/0/05e35197b2df8c1e0a3e615b3bb8dad06d0bb1b6.png)

---

<div class="post-metadata">

**Author:** ![AlThePal](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/althepal/32/3603_2.png) [@AlThePal](https://forum.inductiveautomation.com/u/AlThePal)\
**Post date:** [October 20, 2012, 3:48pm UTC](https://forum.inductiveautomation.com/t/remote-connection-with-mysql/5297/7 "2012-10-20T15:48:24Z")

</div>

I would second what gnguyen says - in my experience it is most likely to be MySQL blocking access from another host. You could try connecting to machine 1 from machine 2 using MySQL Workbench - this sometimes gives more obvious error messages.
