Help about SQL error

Help about SQL error
none 0.0 0
  • HMI Model: cMT FHDX 820
  • EasyBuilder Pro Version: V6.10.01.510

I am using a cMT-FHDX 820, which has two LAN ports with the following addresses:

  • LAN Port 1: 10.10.23.19
  • LAN Port 2: 192.168.0.200

LAN 1 is used to connect to the factory’s Access Point to access the HMI via Wi-Fi using WebView.
LAN 2 is used to connect PLC devices, input/output modules, etc., for data collection, control, and monitoring.

I need to collect Data Sampling into a SQL Server database. The IT department gave me the server’s IP address: 192.168.11.30 ; port 1433 ; User/pass; Database name.

From my laptop, after connecting to the factory’s Wi-Fi. I pinged both IPs 10.10.23.19 FHDX820) and 192.168.11.30 (database server). I saw both IP.

When I tried to test the connection, the connection showed: Status: 0 and Error: 1. Could you please advise if I can establish a data connection from the FHDX 820 HMI to the database?

Thank you so much for your support!

Hi @cuongho ,

What type of server system are you using for your database? If by MS SQL could you try and follow the video below. There are a few options regarding authentication that should be configured.

MS SQL + Data Sampling Object

If you are using mySQL, here is video using the mySQL workbench. Can you this video as well and see if you can get a connection.

My SQL Workbench

If you are still having issues could you send us images of your project set up.

Thank you.

Dear Aaron,

I set up Lan IP address on my Laptop the same Lan address of cMT FHDX 820.

(IP; Subnet; Gateway are the same)

I have tried to test by online simulation from EasyBuilder soft. on my Laptop.

Then, I connect Laptop to Data Base server by Lan cable.

The result is very good. The status: Connected; Error: None

Server received all data from laptop which is simulated from Easybuider.

But, when I config SQL data server the same then I download to real cMT FHD 820. The connection is fail. (Status: 0; Error: 1)

I don’t know why? Although, I have tested Ok by laptop.

Is it the reason come from OS version of FHDX 820 ?

Could you please give me some solutions?

Thank you.

Hi @cuongho,

Can you describe how the database is connected to the HMI? Is it a direct connection, or is there a network switch or other device in between? And how is the LAN1 and LAN2 set up on the HMI?

From my experience, when the database connection works in EasyBuilder simulation but fails on the real HMI, it is often related to network port restrictions between OT devices and the IT network.
I recommend checking the connectivity to the SQL server port directly from the network side. A simple way is to verify if the server is actually listening on the configured port and if the firewall allows access.
On the SQL server, you can check if the port is open using:
netstat -an | find “4433”
If the service is listening, it should return a result like:
TCP 0.0.0.0:4433 LISTENING
Then from another device in the same network you can test the connection with:
Test-NetConnection SERVER_IP -Port 4433
or
telnet SERVER_IP 4433
If the port test fails, the issue is likely related to firewall rules or network restrictions between the HMI network and the database server.
In many industrial environments, OT devices cannot access database ports unless they are explicitly allowed by the IT firewall.
This might explain why the simulation on the laptop works but the real HMI cannot establish the connection.

1 Like