Unable to archive PMU data stream in MYSQL database

Hi, I created a new historian PPA2 by following the directions at this link.

My actual ConnectionString is the following:
BulkInsertLimit=500; DataProviderString={ AssemblyName={MySql.Data, Version=8.0.28, Culture=neutral, PublicKeyToken=c5687fc88969c44d}; ConnectionType=MySql.Data.MySqlClient.MySqlConnection; AdapterType=MySql.Data.MySqlClient.MySqlDataAdapter }; DbConnectionString={ Server=; Database=lower; Uid=root; Password=admin }; TableName=TimeSeriesMeasurement; IDFieldName=SignalID; TimestampFieldName=Timestamp; ValueFieldName=Value

When I launch the command “list /o ADO”, I always have this error. Can you help me?

My goal is to save the data stream generated by PMUs in my mysql database. Thanks

Hi, slt. It sounds like you’ve named your historian PPA2. Perhaps you should try list /o PPA2 instead.

Now the output is this

I didn’t notice it amidst all the list errors in your screenshot from before, but it looks like the openPDC is having trouble connecting to your MySQL server. You may want to do some basic troubleshooting to make sure the openPDC system can connect to the MySQL database using that IP address in your connection string, and also maybe verify that there is no firewall blocking the communications. Also, you might want to check C:\Program Files\openPDC\ErrorLog.txt to see if it maybe provides any more information as to why the openPDC is unable to connect.

Can I verify if the openPDC system can connect to the MySQL database from the Remote System Console? If yes, what is the command?
Thank you for your time.

No, that’s not a feature of the openPDC Console. Even if it was, it probably wouldn’t tell you anything that openPDC isn’t already telling you.

My recommendation would be to use basic network diagnostic tools like ping and telnet. You could also try using MySQL client tools if you can get them installed on the openPDC server. And, as I mentioned earlier, check the ErrorLog.txt file produced by the openPDC to see if you can find any more details about why it’s unable to connect.

Thanks, I’ve solved. The problem was about the IP address in the Connection string. I only have one last question. Can I insert more than one server in the DbConnectionString.Server field? I mean, something like that:
DbConnectionString={ Server= ||; Database=lower; Uid=root; Password=admin };

As far as I know, you can use a comma-separated list for that.

DbConnectionString={ Server=,; Database=lower; Uid=root; Password=admin };

Source: MySQL connection strings - ConnectionStrings.com

Thank you. Sorry, I have one more question (I hope it will be the last :slight_smile:). I need to execute “Initialize PPA” command every 5 minutes. Is there a way to make this command automatic without running it manually every 5 minutes?

I’m sure I don’t understand why you’d need to run the command every 5 minutes. It sounds like something is wrong with your setup if you have that requirement. However, to answer your question, you should be able to script the openPDC Console to send the initialize request with the following command.

echo "Initialize PPA"| openPDCConsole.exe

I have 3 MySQL nodes in HA with a multi-master configuration (so read/write operations are possible in each of them). I correctly configured the Historian so that it stores the data in one of the databases (and then they will align and ensure the consistency of the data).
The problem I have is this:

In the right picture at the beginning of the graph you see that writing operations are done on mysql-0 and on the left picture you can see that the data are replicated in mysql-1 and mysql-2. At 11:49:30 I simulated a failure on the node mysql-0 and the traffic is not redirected to one of the two remaining nodes and the only way to do this is to execute the “Initialize PPA” command. Only in this way at 11:51:30 new writing operations are done in mysql-2 and replicated only in mysql-1 (because mysql-0 dead).

I see. I guess the connection doesn’t attempt to fail over on its own, but rather depends on the application to reconnect to the database. In that case, you’re right that without making any changes to the code in AdoOutputAdapter, that is possibly the most effective way to force a failover.

You might also consider trying the Connect PPA command, which should force the database to reconnect without completely reinitializing the adapter. This would prevent the adapter from also dropping its buffered data when reestablishing the connection.