MySQL Server Questions (FireDAC)

From RAD Studio
Jump to: navigation, search

Go Up to FAQ (FireDAC)

This topic contains a list of questions and answers related to MySQL Server.

Q1: Is there a way to use MySQL C API function mysql_thread_id from FireDAC?

A: Yes, although a bit cryptic:

  • FDConnection1.ConnectionIntf.Driver.CliObj - returns a reference to TMySQLLib;
  • FDConnection1.ConnectionIntf.CliObj - returns a reference to TMySQLSession, which has MySQL property;
  • all together:
  FireDAC.Phys.MySQLCli, FireDAC.Phys.MySQLWrapper;
  with FDConnection1.ConnectionIntf do

Q2: Updating BLOB field with data greater than 512 KB on MySQL causes "MySQL server has gone away" error

A: Please see, which suggests to increase max_allowed_packet.

Q3: Is it possible to establish a SSL connection to a MySQL server?

A: Yes, it is possible. See Connect to MySQL Server, Using a Secure Connection.

Q4: Why does the application hang for a few seconds at exiting? I am using only MySQL connection

A: If your application creates threads, this issue is possible with libmysql.dll v5.x. Please see for details. As a workaround, try to terminate all threads before terminating the application.