Real Time Connect to MySQL

6 posts / 0 new
Last post
Offline
Last seen: 6 years 4 months ago
Joined: 03/27/2013
Posts: 28
Real Time Connect to MySQL

Hi there,

I am trying to connect my DDS application to MySQL database in order to record all samples transfered between my publisher and subscriber.

I have followed RTI_RTC_GettingStarted.pdf guid, but I could not even add rtirtc_mysqlq.dll to mysql plugin directory because the command mentioned there did not affect. I also did not understand the Storing Samples from Publishers section of the pdf file. I think the whole process has not been explained very well. Could you please help me with some extra hints on how to connect my applications to MySQL?

Best regards,

Ashish's picture
Offline
Last seen: 7 years 9 months ago
Joined: 07/16/2013
Posts: 8

Hi Randy,

First, let me re-assure the RTI_RTC_GettingStarted.pdf is complete nothing is missing in there to get your publisher data stored into MySQL DB. 

May I know what platform you are using Windows or Linux? And on what ARCH x86 or x64?

1. rtirtc_mysqlq.dll:

As I don’t know, how you have installed RTI RTC plug-in , with the whole bundle or as a separate installer. But for e.g., you can find <<rtirtc_mysqlq.dll>> at the equivalent location C:\Program Files\RTI\RTI Real-Time Connect 5.0.0\lib\i86Win32 and copy it to the equivalent location C:\Program Files\MySQL\MySQL Server 5.5\lib\plugin

2. Regarding storing the samples from the publisher:

Real-Time Connect Daemon act as a subscriber application to your publish topic and keeps all the data in a table (e.g, Example table).

To do this, we run the following MySQL command after following subsequent relevant OS steps from the RTI_RTC_GettingStarted.pdf,

         insert into RTIDDS_SUBSCRIPTIONS (table_owner, table_name, domain_id, topic_name, type_name) values ('test', 'Example', 0, 'Example MyType', 'MyType');

Let us try to make it happen! 

Best Regards,

Offline
Last seen: 6 years 4 months ago
Joined: 03/27/2013
Posts: 28

Hi Ashish,

Thanks a lot for your reply. I have installed RTI Connext on a x64 Windows 7 platform and I am using MySQL server 5.6 and MySQL ODBC 5.2

Let me explane what I have done so far. I have copied rtirtc_mysqlq.dll into the correct path. The Real-Time Connect was previously installed on my machine with the whole RTI connext package. I created a user account named Student , using the command below:

mysql> GRANT ALL PRIVILEGES ON *.* TO 'Student'@'localhost' IDENTIFIED BY 'mypsswrd' WITH GRANT OPTION;

I have a problem  creating a data source for MySQL, how shall I set the "database" field to "test"? the combobox is empty and I do not see any databases, obviously it can not connect to MySQL. I have another problem configuration file for RealTime Connect. Modifying the default configuration file (as written in RTI_RTC_GettingStarted) is not permitted; according the error message I get when I try to save changes to the file. So how shall I notify the MySQL of the database?

best regards,

Ashish's picture
Offline
Last seen: 7 years 9 months ago
Joined: 07/16/2013
Posts: 8

Hi Randy,

One thing when using RTC on x64 Windows 7 platform, you need to make sure you are using compatible x64 bit version of MySQL 5.6.x as well.

Could you check your MySQL server is x32 bit or x64 bit?

Best Regards,

 

Offline
Last seen: 6 years 4 months ago
Joined: 03/27/2013
Posts: 28

Hi again,

Yes, it is a x64 bit version of MySQL server.

rip
rip's picture
Offline
Last seen: 2 days 21 hours ago
Joined: 04/06/2012
Posts: 324

Creating datasource resources is outside the scope of RTI, it is assumed that the user knows how to do this. You should find a website that explains how to do it, any search engine should direct you to the correct path.  You might use Google, for example, with the search terms "mysql datasource windows".

"I have another problem configuration file for RealTime Connect. Modifying the default configuration file (as written in RTI_RTC_GettingStarted) is not permitted; according the error message I get when I try to save changes to the file."

This implies you installed RTI in c:\Program Files\ or c:\Program Files (x86)\, which have permission/access issues related to Windows' default configuration.  It is possible to pick individual files in those directories and eventually rendor them editible.  Instead, it is recommended to:

Remove the installation.  Install it at c:\RTI or c:\Users\<you>\RTI

Also, why are you trying to edit the default configuration file itself?  Make a copy someplace in your working directory and edit that copy.  Editing default files in place is prone to problems later, for example if you try to file a support request and claim to be using the "default files".  If you have edited them, they are not the default file.