Mysql connection fault between 2 desktops pc's help

Hi guys

I’ve got a network of 3 desktop PC’s all connected via a switch with ethernet cables. They are all on the same default gateway “192.168.0.3” and all of the same network " 192.168.0.xxx". 1 will be the primary PC for ignition to run, 1 will be the backup PC and one will be the historian carrying mysql

But for some reason I cant get them to ping each other. and so I’m unable to get the connection to the mysql database valid.

I’ve turned on File sharing support on the windows features.
I’ve turned of the firewall for all of them, for now just to allow everything (theyre all solely on a network with just them 3) and they’re all of the same workgroup.

Is there anything I should do specifically? i.e. what should the connection url specifically be for the database connection to work
As they are both on separate computers, I’m trying to change the host name on the mysql workbench to match its pc’s ip address but with no luck. what am i doing wrong?
image

Thank you guys for the help in advance! I’m still trying to get my footing on networks here

For starters, in your description you say that the IP addresses have a third octet of “0” but in your screenshot it shows a third octet of “10”. Which is correct? …I’m assuming you are using a /24 subnet mask (255.255.255.0)

Also, if the three computers are on a standalone network then you do not need a “gateway” address assigned on the computers. All traffic should be passing in the local subnet. If there is a gateway assigned and the computer thinks the address that you are attempting to reach is in a different subnet then your computer is sending all traffic to the specified gateway address.

oh sorry, I was just using the 0 as an example. didnt realise it would say the actual one on the image. apologies!

oh i see. I’ll delete the default gateway address’ now thank you!
it seems I’m able to ping from 1 computer to the other but not the other way around.I have both firewall settings to be the same.
is there anything else I have to configure to assure one talks back or?

Thank you for getting back to us, steve

Both computers should be able to ping each other with the following conditions true:

  • Both computers have firewall turned off (or allow any/any on both incoming and outgoing ICMP traffic, and in Windows make sure all network types are allowed)
  • You are using an unmanaged switch in between
  • Each computer has a valid, but different, IP address on the same subnet
  • Each computer has a valid subnet mask

If the firewalls are both turned off then traffic on port 3306 should also pass. If mySQL is installed on Windows then at a command prompt you can type “netstat -a” to check whether the computer is actively listening on port 3306 for outside connections. It may take a few minutes for the command to run. If there is not an entry in the list that has {local IP address}:3306 with a listening status then something else is wrong with either the Windows firewall or with mySQL configuration.

Does the error message shown in the screenshot pop up almost immediately when you attempt to connect? It appears that this message is specifically given when authentication fails. In the settings for mySQL you can specify which hosts users are allowed to log in from. I can’t remember if root is limited to logging in from the local host by default or not.

Hm I seem to have all of those conditions true, I’m not sure why they’re not pinging from the command prompt.

These are all fresh out of the box computers with windows 10. only has mysql /ignition installed so I’m not sure where the issue lies.

Sorry i wasnt very clear, the error pops up when im changing the hostname for that database. its default is 127.0.0.1, but i wanted it to become the actual ipaddress of the computer so that ignition (on the other computer) can detect it that way.

is this an alright method to do?

I don’t think what you are doing is necessary. In the screenshot you posted above, the window pictured is a prompt used to connect to a running database as a client. When you are in MySQL workbench and you create a new connection that is only for the workbench software, which is separate from the mySQL server software, to connect to a database somewhere and manage it. Creating “connections” here have no effect on whether the server is running and listening for connections from other computers.

If you are able to connect to the “local instance” from workbench then you should be able to connect to it remotely, but if you are using the “root” user then you will not be able to connect remotely as the default setting is to only allow connections from the localhost:
image

Rather than change the root user to allow remote connections I would create a new user and give it whatever access you want. In the field “limit to hosts matching” enter “%” to allow connection from any other computer. Then use those new user credentials to get ignition to connect from the other computer.

1 Like

This is it!!

Thank you for guiding me in the right direction steve! Its walking now thank you!

1 Like