|
|
Home /
Groups /
ColdFusion Mac (CF-Mac)
Setting up DSN with MySQL driver on mac
Hi allTom Budd 06/08/07 03:11 A Tom,Doug Hyde 06/08/07 06:56 A Hi Tom,Simon Bailey 06/08/07 04:41 P <A HREF="http://www.nutrixinteractive.com/blog/?p=36" target="_blank" rel="nofollow">http://www.nutrixinteractive.com/blog/?p=36</A>Simon Bailey 06/08/07 05:06 P GuysTom Budd 06/11/07 05:06 A Which port did you set coldfusion up on, I in the tutorial set it upSimon Bailey 06/11/07 05:11 A HiTom Budd 06/11/07 06:29 A Ok mate,Simon Bailey 06/11/07 06:38 A Hi SimonTom Budd 06/11/07 07:49 A Ok mate,Simon Bailey 06/11/07 08:00 A Cheers mateTom Budd 06/11/07 08:12 A Tom,Douglas Hyde 06/11/07 08:36 A Hi DougTom Budd 06/11/07 09:49 A Note, on the Adobe site, there is no support for ms access data on mac osx.Douglas Hyde 06/11/07 10:12 A DougTom Budd 06/12/07 05:29 A OK, got you. You can't install a database in a coldfusion applicationDouglas Hyde 06/12/07 05:20 P Doug and SimonTom Budd 06/18/07 09:54 P Congrats....Douglas Hyde 06/19/07 06:03 A
Author: Tom Budd
Hi all I'm just trying to get a local testing environment set up so that I can begin using some recently purchased shopping cart software- Cartweaver. I'm stuck at the part where I'm trying to submit a DSN in the CF Administrator. Problem with the tutorial I'm following is that it shows you how to set up a dev environment for PC using MS Access and therefore doesn't cover MySQL. To give you an understanding of what I'm doing.... I'm working on a mac using Dreamweaver 8. I've bought Cartweaver 3 and have the latest version of MySQL server running on my machine. I also have CocoaMySQL (I was advised to download this by Cartweaver) which seems to be communicating with MySQL. Cartweaver is also installed into the site. I go into CF Administrator (which I access at http://127.0.0.1:8500/CFIDE/administrator/index.cfm) and add a DSN called testdsn (as per Cartweaver setup tutorial) choosing MySQL (3.x) as driver type (as opposed to MS Access in the tutorial). Another set of options pop up for which I give the following info: CF Data Source Name - testdsn Database - Macintosh HD/Applications/ColdFusionMX7/wwwroot/CWTest/database/mydatabase.mdb (which is the path to the file I created in Dreamweaver) Server - http://localhost:127.0.0.1 (local) Port - 3306 The error message I get back says: Cannot connect to MySQL server on http:3306. Is there a MySQL server running on the machine/port you are trying to connect to? (java.net.UnknownHostException) I've tried putting 8500 as the port but get the same thing. So I'm really not sure what I'm doing wrong and dont seem to be able to find the answer on the net as yet. I dont hve a MySQL dayabase set up but I thought this part came further down the line. Any advice greatly appreciated Tom
Author: Doug Hyde
Tom, It looks to me like the database you are trying to use is an access database, not a mysql database. If you are connected either through ODBC or JDBC, you should be able to specify the name of the database as set out in mysql. MySql listens on port 3306. The name you enter for a database should be a single name like "cartweaver" not a path like " Macintosh HD/Applications/ColdFusionMX7/wwwroot/CWTest/database/mydatabase.mdb". This path would be incorrect anyways as the mac is unix based - you would enter "/Applications/ColdFusionMX7/wwwroot/CWTest/database/mydatabase.mdb" as the absolute path. Unless the data is in mysql already, the steps would be import the access database into mysql (easier on a pc - if you want it to be easy, use navicat mysql gui), where you establish the name of the datasource. This is the name you enter. Hope that helps. Doug
Author: Simon Bailey
Hi Tom, Check out my blog tutorial on setting up a remoting application on mac osx, I explain how to set up a datasource in detail there mate :) Cheers, Simon On 8 Jun 2007, at 11:55, Doug Hyde wrote:
Author: Simon Bailey
http://www.nutrixinteractive.com/blog/?p=36 The link might help if I had attached it :) On 8 Jun 2007, at 21:43, Sim
Author: Tom Budd
Guys Really appreciate you getting back. Simon, I started working my way through your blog, which by the way seems like exactly the sort of reference I've been looking for. I followed it through word for word in Cocoa, only changing the name of the database to CWdatabase, instead of flashmac. For some reason I wasn't able to access CF Administrator through http://localhost:8101/cfusion/CFIDE/administrator/ and instead went through the usual http://127.0.0. 1:8500/CFIDE/administrator/index.cfm. Anyhow I followed the blog through the CF Administrator steps and submitted the DSN and it returned this error: Connection verification failed for data source: CWdatabase java.sql.SQLException: No suitable driver available for CWdatabase, please check the driver setting in resources file, error: null The root cause was that: java.sql.SQLException: No suitable driver available for CWdatabase, please check the driver setting in resources file, error: null Doubled checked it and still got the same message. Actually feel like I'm nearly there with this now and would really appreciate just a little more assistance. Thanks a lot Tom
Author: Simon Bailey
Which port did you set coldfusion up on, I in the tutorial set it up on 8101 hence http://localhost:8101, according to your url, you are set up on 8500? Is that correct? Also send exactly what you entered for each element in setting up your datasource in cf. Cheers Simon On 11 Jun 2007, at 09:56, Tom Budd wrote:
Author: Tom Budd
Hi I set up CF on port 8500 initially as it was the default. I couldn't see anywhere in the blog (Setting up Flash Remoting on Mac OSX using ColdFusion MX7 and MySQL) where you set it to 8101. In CF I named the DSN CWdatabase (to match what I entered in Cocoa) and select Other. I then enter: CF Data Source Name - CWdatabase JDBC URL - jdbc:mysql://localhost:3306/CWdatabase Driver Class - com.mysql.jdbc.Driver Driver Name - blank Username - root Password - blank (as I do not have one) Tom
Author: Simon Bailey
Ok mate, The way I did that tutorial was to provide links at the beginning of the post from reliable sources for setting up coldfusion on mac and also mysql, the reason I did this was I would be recreating the wheel as other guys cover the installation process really well. This is where I had trouble when migrating from installing cf on windows as opposed to mac, mac also runs the cf server on jrun. Follow the first link below and install, then ensure if your running MySQL 5 that you have configured the mysql jdbc driver (http://www.adobe.com/ cfusion/knowledgebase/index.cfm?id=tn_19170). I know it seems like a lot but its really not too much of a hastle to do that little lot: ColdFusion MX 7 on Mac OS X installation links: http://corfield.org/index.cfm?fuseaction=articles.cfmxosx http://www.communitymx.com/content/article.cfm?page=1&cid=C5ACC Ensure you have the Flash Remoting Components and the latest updater: http://www.adobe.com/products/flashremoting/downloads/components/ #flr_fl8 http://www.adobe.com/go/flr_updater/ MySQL on Mac OS X installation links: http://www.entropy.ch/software/MacOSx/mysql/ http://dev.mysql.com/doc/refman/5.0/en/mac-os-x-installation.html http://www.adobe.com/devnet/dreamweaver/articles/php_macintosh.html http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_19170 http://developer.apple.com/internet/opensource/osdb.html On 11 Jun 2007, at 11:20, Tom Budd wrote:
Author: Tom Budd
Hi Simon Is this definitely the way to go for what I'm trying to achieve? It's just I've been trying for no less than 7 stressful weeks to get my dev env set up now and am on the brink of giving up/going mad. I tried going the .jar file route with it about a month ago and it didn't work (cant remember why now as tried so many different approaches) Why is it not the MacOSX version that I need? At the end of the day you clearly know your stuff so if you think this is the way forward then I'll certainly give it one last crack before accepting defeat. Just can't believe it needs to be this complicated. More than anything just soooo annoyed by the company we bought the CF shopping cart software from as they didn't provide instructions for getting the development env set up on mac at all and then were unable to answer my queries. Really really poor. Before following this, should I ditch current versions of CF MX and MySQL? Thanks again Tom
Author: Simon Bailey
Ok mate, I mearly know what I did to get it up and running buddy, I have not tried any other way to get cf on the mac so could not say mate. I am not recommending you to delete your installation, you could do a separate installation, cos you will be configuring it on jrun so will not be the usual coldfusion web root like you have installed it now. Does that make sense? So, if your at the end of your tether with it, yeh give it a go using the links I gave, those work absolutely fine, do your simple tests like they say to check if cf if running then tackle your mysql aspect of the installation. Do not delete though. On 11 Jun 2007, at 12:39, Tom Budd wrote:
Author: Tom Budd
Cheers mate I'll take some deep breaths and get crackin asap. Just to pre-warn you there's a very high possibility that I may need your assistance again. Thanks for that Tom
Author: Douglas Hyde
Tom, You are right...it should be easy. I connected to mysql data on mac osx in 5 minutes. Just to be clear, is the data in mysql now? (sorry for the simple question - no offense intended). From your original message, it appeared to me that it was in a .mdb file, which means it is in ms access. Ms access is not well supported on mac, so you will have trouble if the data is in access. So, if it is an access file, and not in mysql, then the mysql driver will not work. You will need to connect to the access data. I think you will need to install an ODBC driver (see http://www.versiontracker.com/dyn/moreinfo/macosx/28818) and then install from the mac ODBC Administrator (see Applications/Utilities), and then install in coldfusion. Note, I have not tried this. Access is a crappy database for anything more than about 10 simultaneous connections, and not well support on mac osx. ODBC is also slow. So I would migrate the data to mysql. If you send me the mdb file, I will import for you and create a sql script that you can then run in mysql to recreate the database in mysql. To be frank, I would expect the folks at Cartweaver to be more helpful. Assuming that the data is in mysql, and you are having trouble connecting, can you connect to any mysql data? Using Cocaomysql, create a simple database with one table, and two columns, and try connecting to it from coldfusion (set up as a new database). If you can get it working, and the data for cartweaver is in mysql, you should be able to connect. If not, you (1) don't have the mysql.jar file install to allow jdbc connections, or (2) may have a port conflict (some other application listening on port 3306)...if this is the case, though likely, I believe you can reset the port in mysql on installation, or manually in the configuration file - this would get complicated however at the coldfusion end. Have to make sure that coldfusion is also listening through jdbc on the same port, whatever you set it to in mysql. Note, the port that coldfusion admin is running on should have no effect on the port that mysql is listening on. For (1), download the jar file and install and restart coldfusion. I notice from the Cartweaver site, the instructions are for the mdb file. If you migrate to mysql and successfully access through coldfusion, the only trick is you must provide name datasource in coldfusion the same as required by the cartweaver application - "MyCartweaverDSN". Hope that helps. Doug
Author: Tom Budd
Hi Doug No offense taken. More just envious that you managed it so quick. I'm calling it a night but I'll have a good look at what you've said tomorrow. Thanks Tom
Author: Douglas Hyde
Note, on the Adobe site, there is no support for ms access data on mac osx. See: http://www.adobe.com/products/coldfusion/productinfo/systemreqs/fp_frameset. html Scroll down to Macintosh. I still think it could be possible under mac odbc. For example, I am connecting to mysql 5 which is not indicated as supported. Do to this, you must install an updated jdbc driver available from mysql. D
Author: Tom Budd
Doug Thanks again for your help. At this stage there is no data. I have no database set up at all, in fact in all honesty, being a mere graphic designer I've never set up a database in my life before. The only reason there is what looks like a MS Access file is because I was following the Cartweaver DVD (which is costing $25 p/m and caters solely for PC users!) and got to the stage where I'm installing the Cartweaver software into my site... So I'm in Dreamweaver and I've created a CF test site containing a folder named database. I then click to install CartWeaver and get get a popup which requests the following: Select Site, Application folder, Database folder and database filename. So following the DVD, I select my site, appl folder I leave blank, enter 'database' for Database folder and then at this point the DVD says 'For database filename, if you're not using Access then just go ahead and put any old name in here and it will install Access into your site but you can ignore it and connect to whatever server you're using.' This just confused me. As far as I know MS Access isn't available for mac. I carried on regardless and entered 'Mydatabase' and clicked ok. This did generated the file within my database folder but it had a dreamweaver icon next to it instead of the MS Access file like in the tutorial. From here it just went downhill really and here I am. So yeah there is no Access database, for some reason I think DW just added the mdb part as it obviously thought this was what I was trying to create. Tom
Author: Douglas Hyde
OK, got you. You can't install a database in a coldfusion application without accessing coldfusion administrator. If you don't have direct access, then find the guy who does. Do you even have coldfusion installed? I think we should take this off list. Its really not that hard - I have found turn key solutions are never turn key. Doug
Author: Tom Budd
Doug and Simon Just wanted to let you know that CF Admin actually accepted my DSN for the first time last night, after about 6 weeks trying. Once I'd installed the MySQL JDBC driver as advised by Doug it then allowed me to successfully submit the DSN I created when following Simon's blog. So between the two of you cheers for that. Tom ps My client has been looking at a couple of potential ISP's. Anyone heard of these guys? or if not can you perhaps suggest a decent one?: www.dailyrazor.com/cfmx/cfmx_plans.php?r=1&gclid=CJrVt4Tz2owCFQ1dPgodvAr
Author: Douglas Hyde
Congrats.... On ISP, the main thing to look for is whether all the coldfusion tags you need are supported. Some of them turn off (or supply alternate) tags (like cffile) for security reasons. The other thing is session variables....if you use them, they can be set at the server to time out in very short time frames (like 10 minutes). Don't know your app, but client variables are sometimes better if you are moving to a hosted environment. Cheers, Doug
|
Mailing Lists
|
Latest Fusion Authority Articles
|
||||||