create mySQ DB with CF

View: New views
3 Messages — Rating Filter:   Alert me  

create mySQ DB with CF

by John Barrett :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hi,
is there a way to create a MySQL database with ColdFusion?
so if I want a MySQL database called John can I do this with ColdFusion?

Thanks,
John

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists
Archive: http://www.houseoffusion.com/groups/cf-newbie/message.cfm/messageid:4856
Subscription: http://www.houseoffusion.com/groups/cf-newbie/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.15

RE: create mySQ DB with CF

by Paul Kukiel-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


If you create a user that has permission to add databases you can write
database create scripts and run it with ColdFusion.  Then you can use the
CFAdmin API to make new data sources.  

Paul.

-----Original Message-----
From: John Barrett [mailto:barrjohnm@...]
Sent: Saturday, October 24, 2009 4:48 PM
To: cf-newbie
Subject: create mySQ DB with CF


Hi,
is there a way to create a MySQL database with ColdFusion?
so if I want a MySQL database called John can I do this with ColdFusion?

Thanks,
John



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists
Archive: http://www.houseoffusion.com/groups/cf-newbie/message.cfm/messageid:4857
Subscription: http://www.houseoffusion.com/groups/cf-newbie/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.15

Re: create mySQ DB with CF

by John Barrett :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hi Paul,
Thanks for you help!

I was able to get the tables written with CF, but to create the database and datasource still have not figured out. Are you saying that if I have a user with the right privileges, I can just use CF and use the MySQL create database?

I tried to use this(after I created a datasource in CF Admin:
<cfquery name = "createdb" datasource="iron" username="root" password="">
CREATE DATABASE iron
</cfquery>

the root has no password, and full rights.
Thanks again`-`
Johnny

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists
Archive: http://www.houseoffusion.com/groups/cf-newbie/message.cfm/messageid:4858
Subscription: http://www.houseoffusion.com/groups/cf-newbie/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.15