CFConfig Documentation
Search…
Introduction
The Basics
About This Book
Authors
Overview
Getting Started Guide
Supported Engines
Config Items
Using the CLI
Installation
Usage
CommandBox Server Interceptors
Command Overview
Export Settings
Import Settings
Transfer Settings
Diff Settings
Set/View Settings
Manage Datasources
Manage CF Mappings
Manage Caches
Manage Mail Servers
Manage Event Gateway Configuration
Manage Event Gateway Instances
Manage Lucee Loggers
Manage Scheduled Tasks
JSON File Storage
Env Var Overrides
Using the Services
Installation
Component Overview
API Overview
Powered By
GitBook
Manage Datasources
There are three commands to manage datasources.
List all datasources
cfconfig datasource list
cfconfig datasource list from=serverName
cfconfig datasource list from=/path/to/server/home
To receive the data back as JSON, use the
--JSON
flag.
cfconfig datasource list --JSON
Edit an existing or create a new datasource
Add a new datasource or update an existing datasource. Existing datasources will be matched based on the name. Valid dbdriver options are
MSSQL
-- SQL Server driver
MSSQL2
-- jTDS driver
PostgreSql
Oracle
Other
-- Custom JDBC URL
MySQL
cfconfig datasource save name=myDSN dbdriver=mysql host=localhost port=3306 database=myDB username=brad password=foobar
cfconfig datasource save name=myDS ... to=serverName
cfconfig datasource save name=myDS ... to=/path/to/server/home
Delete a datasource
Identify the datasource uniquely by the name.
cfconfig datasource delete foo
cfconfig datasource delete foo serverName
cfconfig datasource delete foo /path/to/server/home
Previous
Set/View Settings
Next
Manage CF Mappings
Last modified
6mo ago
Copy link
Edit on GitHub
Outline
List all datasources
Edit an existing or create a new datasource
Delete a datasource