Monday, February 14, 2005
STAGE 2: Install mySQL and myODBC
The plan of attack for Stage 2 is this:
INSTALLING mySQL (Cert in Web Apps CD)
Okay, I charged right in and tried to install it from the zip archive on the CD. Don't, it doesn't work!!!
Extract the zip to a temp directory on your hard drive, then double click "setup.exe".
I jjust followed the wizard through (paying no attention to the EULA etc.... as usual) and it got to the end.
Appendix A in mySQL in 24 hours has more detail if you need it.
STARTING UP mySQL
Great, I thought, I'lll find the icon in the Programs menu and fire it up. Trouble is the mySQL install doesn't set up a Programs group for mySQL or drop a short-cut on the desktop.
So, you have to find the .exe on the hard disk all by yourself (still with me?).
You find the .exe you need here:
c:\mySQL\bin\winmysqladmin.exe
When you first start mySQL admin it asks you to set up a username and password. So I gave it a user name and password without really understanding what I was doing.
INSTALLING myODBC (Cert in Web Apps CD)
The next bit is installing myODBC. Straightforward install. Just selected all the default options. Seemed happy.
ADD A DATABASE AND USER TO mySQL
I haven't done this yet but I'm only at the start of Hour 4 (14/02/2005). Maybe all will be revealed as I push forward through the book!!!
USING myODBC - CONFIGURE A SYSTEM DSN
You won't find a Prgoram Group for myODBC in your Programs folder either. You need to go into it via:
Control Panel>AdminstrationTools>myODBC-3-test
I got as far as "Test Data Source" - clicked it, it was happy that it could talk to "mysql-4.0.17-nt".
TEST WITH .CFM FILE
Okay, when I used this test page (drop the code below into an HTML document and save it as a .cfm file), my installation didn't work (see below). As of 14/02/2005, I am still trying to sort it out, but reckon reading mySQL in 24hrs could be the way forward!
<html>
<head>
<title>TT380 ColdFusion Test Page</title>
</head>
<body>
<cfquery name="databases" datasource="the data source name you used"
debug="yes">
show databases;
</cfquery>
<!-- Note: No output will be generated on the page from this query if the
connection is good, if not good an error is displayed on the page. -->
<cfoutput>
<p>Today is #DateFormat(now())#</p>
</cfoutput>
</body>
WHAT I HAVEN'T DONE
Is add a database and user in mySQL becuase I haven't read that bit in mySQL in 24 hours yet. Maybe when I do all that follows will magically drop into place. Still think this is complicated but I guess running a web server is or else we'd all be doing it!!!!
WHERE I GOT STUCK
Everything is okay right up to the point where I test it all using Alistair's 2nd test page (see above). I get the following error message displayed in Firefox:
Error Occurred While Processing Request
Error Diagnostic Information
ODBC Error Code = ()
Unsupported ODBC data source the data source name you used for ColdFusion Express. The data source may not exist or no driver is specified for the data source.
The error occurred while processing an element with a general identifier of (CFQUERY), occupying document position (6:1) to (6:81).
Date/Time: 02/13/05 21:35:10
Browser: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
Remote Address: 127.0.0.1
Template: c:\opensa\apache\htdocs\index2.cfm
HELP YOU CAN GIVE ME:
1. If anybody can interpret the above output from Firefox for me I would be v. grateful.
I'll read around mySQL in 24 hours a bit more a see where I get to. I'm out of my comfort zone using anything that doesn't have drop-down menus, maybe I'lll cure that phobia during the next 12 weeks!!!!
Maybe my questions are answered in mySQL Hour 4?
- Install MySQL and MyODBC from course CD.
- Add a database and user to MySQL as per MySQL in 24hrs.
- Configure a system DSN for MyODBC.
- Test with a file index.cfm
INSTALLING mySQL (Cert in Web Apps CD)
Okay, I charged right in and tried to install it from the zip archive on the CD. Don't, it doesn't work!!!
Extract the zip to a temp directory on your hard drive, then double click "setup.exe".
I jjust followed the wizard through (paying no attention to the EULA etc.... as usual) and it got to the end.
Appendix A in mySQL in 24 hours has more detail if you need it.
STARTING UP mySQL
Great, I thought, I'lll find the icon in the Programs menu and fire it up. Trouble is the mySQL install doesn't set up a Programs group for mySQL or drop a short-cut on the desktop.
So, you have to find the .exe on the hard disk all by yourself (still with me?).
You find the .exe you need here:
c:\mySQL\bin\winmysqladmin.exe
When you first start mySQL admin it asks you to set up a username and password. So I gave it a user name and password without really understanding what I was doing.
INSTALLING myODBC (Cert in Web Apps CD)
The next bit is installing myODBC. Straightforward install. Just selected all the default options. Seemed happy.
ADD A DATABASE AND USER TO mySQL
I haven't done this yet but I'm only at the start of Hour 4 (14/02/2005). Maybe all will be revealed as I push forward through the book!!!
USING myODBC - CONFIGURE A SYSTEM DSN
You won't find a Prgoram Group for myODBC in your Programs folder either. You need to go into it via:
Control Panel>AdminstrationTools>myODBC-3-test
I got as far as "Test Data Source" - clicked it, it was happy that it could talk to "mysql-4.0.17-nt".
TEST WITH .CFM FILE
Okay, when I used this test page (drop the code below into an HTML document and save it as a .cfm file), my installation didn't work (see below). As of 14/02/2005, I am still trying to sort it out, but reckon reading mySQL in 24hrs could be the way forward!
<html>
<head>
<title>TT380 ColdFusion Test Page</title>
</head>
<body>
<cfquery name="databases" datasource="the data source name you used"
debug="yes">
show databases;
</cfquery>
<!-- Note: No output will be generated on the page from this query if the
connection is good, if not good an error is displayed on the page. -->
<cfoutput>
<p>Today is #DateFormat(now())#</p>
</cfoutput>
</body>
WHAT I HAVEN'T DONE
Is add a database and user in mySQL becuase I haven't read that bit in mySQL in 24 hours yet. Maybe when I do all that follows will magically drop into place. Still think this is complicated but I guess running a web server is or else we'd all be doing it!!!!
WHERE I GOT STUCK
Everything is okay right up to the point where I test it all using Alistair's 2nd test page (see above). I get the following error message displayed in Firefox:
Error Occurred While Processing Request
Error Diagnostic Information
ODBC Error Code = ()
Unsupported ODBC data source the data source name you used for ColdFusion Express. The data source may not exist or no driver is specified for the data source.
The error occurred while processing an element with a general identifier of (CFQUERY), occupying document position (6:1) to (6:81).
Date/Time: 02/13/05 21:35:10
Browser: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
Remote Address: 127.0.0.1
Template: c:\opensa\apache\htdocs\index2.cfm
HELP YOU CAN GIVE ME:
1. If anybody can interpret the above output from Firefox for me I would be v. grateful.
I'll read around mySQL in 24 hours a bit more a see where I get to. I'm out of my comfort zone using anything that doesn't have drop-down menus, maybe I'lll cure that phobia during the next 12 weeks!!!!
Maybe my questions are answered in mySQL Hour 4?
Comments:
<< Home
Hi I'm no expert but should this line
datasource="the data source name you used" be changed to point to the ODBC datasource that you created ie xp1234?
regards
Guzzer
Post a Comment
datasource="the data source name you used" be changed to point to the ODBC datasource that you created ie xp1234?
regards
Guzzer
<< Home