Data & Services > Data Sources
Manage data sources connections and configuration
Within this section, we can add and manage data sources (DSN's) in ColdFusion. Connecting to databases was one of the first widespread uses of ColdFusion.
MySQL/MariaDB Driver
MySQL and MariaDB drivers must be manually downloaded and added to the CF-HOME/lib directory. ColdFusion provides links to download the appropriate drivers for both database systems.
Data Source Configuration
This interface allows you to add, edit, validate, and remove data sources. For security purposes, it is recommended to use database accounts with only the minimum required permissions. The connection string field allows you to specify custom JDBC URL attributes when needed.
Connection Settings
It is recommended to enable "Maintain connections across client requests" for improved performance. You can specify both the connection persistence duration and the interval for checking connection health.
Allowed SQL Settings
By default, all SQL operations are enabled for data sources. However, it is recommended to limit each data source to only the SQL operations that are necessary for your application. This helps reduce the risk of SQL injection attacks and other security vulnerabilities.
Blob/Clob Support
Binary Large Object (BLOB) and Character Large Object (CLOB) support is disabled by default. Enable this feature only if your application specifically requires it, as it can impact performance.
Connection Validation
It is recommended to enable connection validation to ensure database connection reliability. While this feature may have a small performance impact, it helps prevent errors caused by stale or broken database connections.