Using mySql as a datasource

Discuss Using mySql as a datasource in the Cold Fusion Development forum on Dev Articles. Using mySql as a datasource Cold Fusion Development forum discussing the creation of pages using Adobe’s (formerly Macromedia's) CFM development environment. Build dynamic and database driven websites with ease.

you shouldn't need the ODBC connector. CFMX uses JDBC and actually includes JDBC drivers for MySQL. You just need to log in to the CF administrator, click 'datasources', enter a datasource name, and under 'Driver', select MySQL.

By default, CFMX Pro includes the drivers for MS SQL Server, and MySQL. CFMX Enterprise includes 3rd party JDBC drivers for several other type of databases like Oracle, Sybase, DB2, etc.

If you're using MySql on a windows box
you'll need to add a datasource in Windows.

Do this... Open the control panel in windows
(if you cant do this you need to learn windows before
you start cfml
Then click on Administrative tools, ODBC Data Sources,
Choose the "System" tab and click Add
Choose MySQL driver
Then fill out the info and click Test
to see if you have the passwords and whatnot right.
If it fails work with what you entered and fix it.
After that click OK and your new datasource should
be found by CF.

If you're using MySql on a windows box
you'll need to add a datasource in Windows.

Do this... Open the control panel in windows
(if you cant do this you need to learn windows before
you start cfml
Then click on Administrative tools, ODBC Data Sources,
Choose the "System" tab and click Add
Choose MySQL driver
Then fill out the info and click Test
to see if you have the passwords and whatnot right.
If it fails work with what you entered and fix it.
After that click OK and your new datasource should
be found by CF.

Have a great day!

Phillip

Hi, Phillip

I have a similar problem I can create a datasource
(using the method you mention) to the test database, but not to my own. I
get the error access denied to user @localhost for database 'my database'.
Any Ideas?