Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Can we connect with Firedac TFDQuery to a MySQL database via TCP/IP ?


This question is answered. Helpful answers available: 0. Correct answers available: 1.


Permlink Replies: 5 - Last Post: Nov 9, 2015 10:58 PM Last Post By: Dmitry Arefiev
Mark Patterson

Posts: 15
Registered: 5/28/07
Can we connect with Firedac TFDQuery to a MySQL database via TCP/IP ?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 5, 2015 8:31 PM
Hi

Just a quick question. We have legacy database code using SQL to talk to MySQL databases on servers, all in a VCL suite of apps. Can we convert that client-server stuff to Firemonkey - firedac for Android and iOS devices?

TIA
Mark
Dmitry Arefiev

Posts: 1,406
Registered: 12/7/03
Re: Can we connect with Firedac TFDQuery to a MySQL database via TCP/IP ?
Helpful
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 5, 2015 10:46 PM   in response to: Mark Patterson in response to: Mark Patterson
FireDAC MySQL driver does not support mobile platforms.
But you can consider to use DataSnap to work with MySQL from mobile platforms.

--
With best regards,
DA
Mark Patterson

Posts: 15
Registered: 5/28/07
Re: Can we connect with Firedac TFDQuery to a MySQL database via TCP/IP ?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 5, 2015 11:03 PM   in response to: Dmitry Arefiev in response to: Dmitry Arefiev
Dmitry Arefiev wrote:
FireDAC MySQL driver does not support mobile platforms.
But you can consider to use DataSnap to work with MySQL from mobile platforms.

Thanks. Any idea why that is the case? That makes it much harder to share development work.
Dmitry Arefiev

Posts: 1,406
Registered: 12/7/03
Re: Can we connect with Firedac TFDQuery to a MySQL database via TCP/IP ?
Helpful
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 6, 2015 12:01 AM   in response to: Mark Patterson in response to: Mark Patterson
Thanks. Any idea why that is the case? That makes it much harder to share development work.

This is because MySQL client library (libmysql) does not exist for mobile platforms.
FireDAC MySQL driver uses libmysql to connect to MySQL server.

--
With best regards,
Dmitry
Mark Patterson

Posts: 15
Registered: 5/28/07
Re: Can we connect with Firedac TFDQuery to a MySQL database via TCP/IP ?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 9, 2015 5:12 PM   in response to: Dmitry Arefiev in response to: Dmitry Arefiev
Dmitry Arefiev wrote:
Thanks. Any idea why that is the case? That makes it much harder to share development work.

This is because MySQL client library (libmysql) does not exist for mobile platforms.
FireDAC MySQL driver uses libmysql to connect to MySQL server.

OK, I guess the question I wanted to ask is Why do libmysql and the like not exist for mobile platforms?
Dmitry Arefiev

Posts: 1,406
Registered: 12/7/03
Re: Can we connect with Firedac TFDQuery to a MySQL database via TCP/IP ?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 9, 2015 10:58 PM   in response to: Mark Patterson in response to: Mark Patterson
OK, I guess the question I wanted to ask is Why do libmysql and the like not exist for mobile platforms?

In general, libmysql or other DB client libraries require a stable persistent
TCP/IP session with a database. A mobile devices and applications works
differently. This is probably why DB vendors do not provide clients for mobile
devices. REST API would work much better in mobile environment.

But you can try to build libmysql on your own:
* http://docwiki.embarcadero.com/RADStudio/Seattle/en/Connect_to_MySQL_Server_%28FireDAC%29#Obtaining_the_iOS_Client_Software
* http://stackoverflow.com/questions/3545384/can-i-directly-access-mysql-from-iphone-using-mysql-api
etc

--
With best regards,
Dmitry
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02