Manage Datasources
There are three commands to manage datasources.

List all datasources

1
cfconfig datasource list
2
cfconfig datasource list from=serverName
3
cfconfig datasource list from==/path/to/server/home
Copied!
To receive the data back as JSON, use the --JSON flag.
1
cfconfig datasource list --JSON
Copied!

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
1
cfconfig datasource save name=myDSN dbdriver=mysql host=localhost port=3306 database=myDB username=brad password=foobar
2
cfconfig datasource save name=myDS ... to=serverName
3
cfconfig datasource save name=myDS ... to=/path/to/server/home
Copied!

Delete a datasource

Identify the datasource uniquely by the name.
1
cfconfig datasource delete foo
2
cfconfig datasource delete foo serverName
3
cfconfig datasource delete foo /path/to/server/home
Copied!