Home > Forum > Operator terminals (Weintek) > MySQL connection with cMT-SVR
tagged: connection, mysql, sql
- This topic has 4 replies, 1 participant and was last updated 2 years, 9 months ago da Sergio Bertana.
-
AuthorPost
-
June 30, 2020 at 8: 28 am #56376MastergumiParticipant
I'm having a problem connecting with the MySQL application to EBPro. I have successfully created a SCHEMA and a TABLE in mySQL working correctly, as I have tested them with some queries directly within MySQL, but when communicating with EBPro (and importing the DB columns) I always receive the error of: “Database server connection failed”.
The communication port is the same side as mySQL and EBPro (3306) and the names of the tables also coincide. Anyone have any idea what the problem might be?
June 30, 2020 at 9: 48 am #56394Sergio BertanaAdministrator ForumI tried to make a simple example of connection to a public database, I used the free service offered by db4free.net. Configured the server (Screenshot) can be defined in the TAB Status/Control the word in which the connection status is transferred and the possible word to control the connection.
To test the connection to the database define a new query and use the key Import from server which imports all fields from the indicated table (Screenshot).
To find the cause of your problem you could visualize the status word and the error word (Defined in the TAB Status/Control) on the panel and see what value they have. You say that you have tested the queries directly in MySQL but you are sure that the database is reachable from an external connection to the machine ... Try connecting to the database from another PC with a query manager (Example DBeaver).
I report the meaning of the values returned in the 2 status words.
[Status address] (Status indicator)
Value o indicates that the Database Server is not attempting to connect te the database.
Value 1 indicates that the Database Server fails to connect to the database.
Value 2 indicates that the Database Server successfully connects to the database.[Status address+1] (Error indicator)
Value 0 indicates no error.
Value 1 indicates unknown error.
Value 2 indicates that the Database Server fails to connect to the database.
Value 3 indicates that the database clocks the unauthorized connection.
Value 4 indicates that the database name is incorrect.
Value 5 indicates that the domain name is invalid.July 31, 2020 at 8: 06 am #57158Sergio BertanaAdministrator ForumI add to the previous post this link to download a Weintek demo that illustrates how to manage queries on a MySQL database. Here is the overview given by Weintek
The following demo will introduce how to use the Basic Mode and Advanced Mode of SQL Query to read and modify the data in MySQL database. In Advanced mode, the data in the database can be read and operated with SQL language.
July 6, 2021 at 4: 01 pm #60507[email protected]ParticipantIf possible I would like a confirmation before buying.
With the company cMT-SVR-100 Cloud HMII can read variables on a PLC in modbus and go to read and write data on my MySQL DB reachable on a fixed IP, naturally with a pre-existing internet connection.
My need is to read the status of some values on boats and write them on a DB.
July 6, 2021 at 4: 19 pm #60510Sergio BertanaAdministrator ForumAs you can see from the comparison of characteristics among the various HMIs the cMT-SVR it supports SQL queries and of course it has both RTU and TCP Modbus support.
Of course to solve the problem you will have to work with macros on the panel, for the management of SQL queries you can take a look at this article.
However, I remind you that EasyBuilderPro allows the complete simulation of the project, so you can try to write your program and test it in simulation before purchasing the cMT-SVR.
-
AuthorPost
- You must be logged in to reply to this topic.