Re: WebDNA and SQL
This WebDNA talk-list message is from 2003
It keeps the original formatting.
numero = 50071
interpreted = N
texte = Jim Lanford is working on this step by step. This is a draft he sent to me.This is a start of a mini HowTo for getting Linux WebCatalog, unixODBC,MyODBC to work with MySQL It's a work in progress. The ODBC part worked only on 2 of 4 servers. Q1: Do I have a config problem with unixODBC or MyODBC ? Q2: Is there a way for force the ODBC Libraries to reload / reset (orsomething)? Q3: Are there other Linux clients to easily test the ODBC stuff with. (that will return a better error message on ODBC conf issues)I'm a MySQL / ODBC nubie, so there is a good chance that I'm doing somethingwrong with the configure / install of unixODBC and / or MyODBC- I have 4 Linux servers on the Internet 3 RH 6.2 and one RH 7.0- WebCatalog/ Apache work on all 4- MySQL works on all 4- ODBC only works on 2- I set them up the same way by pasting the below commands into a termwindow to avoid typos and be consistent across all 4 servers.- Using exact same odbc.ini and WebCatalog templates, the 2 working serversand talk to all 4 test databases. (one of them is local)- The 4 databases are the same with an extra record containing the servername- The servers are all remote so I can't use the ODBC GUI stuff.## ODBC was written by Microsoft so all the books talk about running it onWindows## and using windows the configure ODBC## On Linux, you can use a text editor to edit the odbc.ini files## on Linux, my setup looks like this1) Application (WebCatalog)2) ODBC Driver Manager (unixODBC)3) ODBC Driver (MyODBC) --- internet ---4) DB - MySQL server B -- MySQL server C -- etc.I've installed WebCatalog / Apache many times on many Linux configurations(even MacOSX).http://www.smithmicro.com/isd/webcatalog/WebCatalog / Apache works fine and will give 'Error: SQL not supported' if'WebCatalog Prefs' does not contain the correct path to unixODBC - - - - -Edit - WebCatalog Prefs - - - - - - - - - -SQLLibraryPath /usr/local/unixODBC/lib/libodbc.so - - - - - - - - - - - - - - - - - - - - -I don't get the 'SQL not supported' error, I get the other SQL error whichis returned for all other SQL problemsSQL Error: 00000Playing arround with a working system, I can get this error when- odbc.ini is setup incorrectly- the WebCat .tpl file has an error- the remote and local passwords do not match- the remote SQL server is down and so on.After Apache / WebCat was working, this is what I did:## get the needed softwarencftpget ftp://mirror.sit.wisc.edu/mirrors/mysql/Downloads/MySQL-3.23/MySQL-3.23.38-1.i386.rpmncftpget ftp://mirror.sit.wisc.edu/mirrors/mysql/Downloads/MySQL-3.23/MySQL-client-3.23.38-1.i386.rpmncftpget ftp://mirror.sit.wisc.edu/mirrors/mysql/Downloads/MySQL-3.23/MySQL-shared-3.23.38-1.i386.rpmncftpget ftp://mirror.sit.wisc.edu/mirrors/mysql/Downloads/MySQL-3.23/MySQL-devel-3.23.38-1.i386.rpmncftpget ftp://mirror.sit.wisc.edu/mirrors/mysql/Downloads/MyODBC/MyODBC-2.50.37.tar.gzlynx http://www.unixodbc.org/unixODBC-2.0.6.tar.gz## install the RPMsrpm -Uvh MySQL-shared-3.23.38-1.i386.rpmrpm -Uvh MySQL-devel-3.23.38-1.i386.rpmrpm -Uvh MySQL-client-3.23.38-1.i386.rpmrpm -Uvh MySQL-3.23.38-1.i386.rpm on one server I needed:rpm -Uvh --nodeps --force MySQL-3.23.38-1.i386.rpm## get ready to compilemv MyODBC-2.50.37.tar.gz /usr/local/mv unixODBC-2.0.6.tar.gz /usr/local/cd /usr/local/tar xzf MyODBC-2.50.37.tar.gztar xzf unixODBC-2.0.6.tar.gzcd /usr/local/unixODBC-2.0.6/./configure \ --prefix=/usr/local/unixODBC \ --x-include=/usr/X11R6/include \ --x-libraries=/usr/X11R6/lib## this make can take one hourmakemake installcd /usr/local/MyODBC-2.50.37 ./configure \ --prefix=/usr/local/unixODBC \ --with-mysql-dirs=/usr/lib/mysql \ --with-mysql-includes=/usr/include/mysql \ --with-unixODBC=/usr/local/unixODBCmakemake install#### build the odbcinst.ini and odbc.ini files## using the same info from the working servercd /usr/local/unixODBC/bin/./odbcinst -i -d -f template_file./odbcinst -i -s -f template_file1 - - - - - - template_file - - - - - - - - -[Myodbc]Decription = MyodbcDriver = /usr/local/unixODBC/lib/libmyodbc.soSetup = /usr/local/unixODBC/lib/libodbcmyS.so - - - - - - - - - - - - - - - - - - - - - - - - - - - template_file - - - - - - - - -[MySQLone]Description = myodbcDriver = /usr/local/unixODBC/lib/libmyodbc.soTrace = YesTraceFile = sql1.log# need IP address for the server belowServer = 192.168.168.1User = martinPassword = number9Port = 3306Socket =Database = band# repeat for each server[MySQLtwo] - - - - - - - - - - - - - - - - - - - - -# - - - - - - My SQL setup - - - - - - - - - -Using the MySQL area Webminhttp://www.webmin.com/webmin/On each server I added a- db called band- table called BeatlesWith varchar 30 fields: Name and instThen I pasted into the 'Execute SQLINSERT INTO Beatles VALUES('George','Lead');INSERT INTO Beatles VALUES('John','Rhythm');INSERT INTO Beatles VALUES('Paul','Bass');INSERT INTO Beatles VALUES('Ringo','Drums'); and on each server its nameINSERT INTO Beatles VALUES('Server','NumberOne'); - - - - - - - - - - - - - - - - - - - - -# WebCat html page: one per server - - - - - - testone.tpl - - - - - - - - - - [thisURL]
[sql dsn=MySQLone&username=martin&password=number9&statement=SELECT * FROM Beatles;] Found [NumFound] items
[FoundItems] Name = [Name], inst = [inst]
[/FoundItems][/sql]
DONE QUERY MySQL - - - - - - - - - - - - - - - - - - - - -I wanted to be complete enough so that others could try the same setup.TIA- JimSalvatore D'Anna ************WebDNA*************Smith Micro Software Developer Resource CenterSales Engineer http://WebDNA.SmithMicro.com(949)360-8587 sdanna@smithmicro.com
************WebDNA************* -----Original Message-----From: Clint Davis [mailto:cdavis@grayloon.com]Sent: Tuesday, May 06, 2003 5:34 AMTo: WebDNA-Talk@talk.smithmicro.comSubject: Re: WebDNA and SQLNitai,I'm running this combo under OSX 10.2.4, but I can't give you a step by stepprocedure because it took me a couple of tries to get it working.I'm using MySQL 3.23.55 with the built-in OSX ODBC app. Make sure you setupMySQL with a username and password for use by WebDNA. Also, make sure yousetup your DSNs in the ODBC app.I'll provide more info when I get into the office.On 5/6/03 2:35 AM, Nitai @ ComputerOil wrote:> I somehow got stuck with ODBC and MySQL. I got MySQL running and all is> working fine, just cant get ODBC talk to MySQL. Also MyODBC is installed,> but unixODBC does only make with errors and alike.> > Would anybody be so kind and tell me in a step like way how to do it, or> give me a URL so I can find it out?---------------------------------------------------------------------Clint DavisWebmaster / Interactive Media SpecialistGray Loon Marketing Group, Inc. http://www.grayloon.com204 Main Street | Evansville, IN 47708 | Phone:812-422-9999----------------------------------------------------------------------------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail toWeb Archive of this list is at: http://webdna.smithmicro.com/-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
Associated Messages, from the most recent to the oldest:
Jim Lanford is working on this step by step. This is a draft he sent to me.This is a start of a mini HowTo for getting Linux WebCatalog, unixODBC,MyODBC to work with MySQL It's a work in progress. The ODBC part worked only on 2 of 4 servers. Q1: Do I have a config problem with unixODBC or MyODBC ? Q2: Is there a way for force the ODBC Libraries to reload / reset (orsomething)? Q3: Are there other Linux clients to easily test the ODBC stuff with. (that will return a better error message on ODBC conf issues)I'm a MySQL / ODBC nubie, so there is a good chance that I'm doing somethingwrong with the configure / install of unixODBC and / or MyODBC- I have 4 Linux servers on the Internet 3 RH 6.2 and one RH 7.0- WebCatalog/ Apache work on all 4- MySQL works on all 4- ODBC only works on 2- I set them up the same way by pasting the below commands into a termwindow to avoid typos and be consistent across all 4 servers.- Using exact same ODBC.ini and WebCatalog templates, the 2 working serversand talk to all 4 test databases. (one of them is local)- The 4 databases are the same with an extra record containing the servername- The servers are all remote so I can't use the ODBC GUI stuff.## ODBC was written by Microsoft so all the books talk about running it onWindows## and using windows the configure ODBC## On Linux, you can use a text editor to edit the ODBC.ini files## on Linux, my setup looks like this1) Application (WebCatalog)2) ODBC Driver Manager (unixODBC)3) ODBC Driver (MyODBC) --- internet ---4) DB - MySQL server B -- MySQL server C -- etc.I've installed WebCatalog / Apache many times on many Linux configurations(even MacOSX).http://www.smithmicro.com/isd/webcatalog/WebCatalog / Apache works fine and will give 'Error: SQL not supported' if'WebCatalog Prefs' does not contain the correct path to unixODBC - - - - -Edit - WebCatalog Prefs - - - - - - - - - -SQLLibraryPath /usr/local/unixODBC/lib/libODBC.so - - - - - - - - - - - - - - - - - - - - -I don't get the 'SQL not supported' error, I get the other SQL error whichis returned for all other SQL problemsSQL Error: 00000Playing arround with a working system, I can get this error when- ODBC.ini is setup incorrectly- the WebCat .tpl file has an error- the remote and local passwords do not match- the remote SQL server is down and so on.After Apache / WebCat was working, this is what I did:## get the needed softwarencftpget ftp://mirror.sit.wisc.edu/mirrors/mysql/Downloads/MySQL-3.23/MySQL-3.23.38-1.i386.rpmncftpget ftp://mirror.sit.wisc.edu/mirrors/mysql/Downloads/MySQL-3.23/MySQL-client-3.23.38-1.i386.rpmncftpget ftp://mirror.sit.wisc.edu/mirrors/mysql/Downloads/MySQL-3.23/MySQL-shared-3.23.38-1.i386.rpmncftpget ftp://mirror.sit.wisc.edu/mirrors/mysql/Downloads/MySQL-3.23/MySQL-devel-3.23.38-1.i386.rpmncftpget ftp://mirror.sit.wisc.edu/mirrors/mysql/Downloads/MyODBC/MyODBC-2.50.37.tar.gzlynx http://www.unixODBC.org/unixODBC-2.0.6.tar.gz## install the RPMsrpm -Uvh MySQL-shared-3.23.38-1.i386.rpmrpm -Uvh MySQL-devel-3.23.38-1.i386.rpmrpm -Uvh MySQL-client-3.23.38-1.i386.rpmrpm -Uvh MySQL-3.23.38-1.i386.rpm on one server I needed:rpm -Uvh --nodeps --force MySQL-3.23.38-1.i386.rpm## get ready to compilemv MyODBC-2.50.37.tar.gz /usr/local/mv unixODBC-2.0.6.tar.gz /usr/local/cd /usr/local/tar xzf MyODBC-2.50.37.tar.gztar xzf unixODBC-2.0.6.tar.gzcd /usr/local/unixODBC-2.0.6/./configure \ --prefix=/usr/local/unixODBC \ --x-include=/usr/X11R6/include \ --x-libraries=/usr/X11R6/lib## this make can take one hourmakemake installcd /usr/local/MyODBC-2.50.37 ./configure \ --prefix=/usr/local/unixODBC \ --with-mysql-dirs=/usr/lib/mysql \ --with-mysql-includes=/usr/include/mysql \ --with-unixODBC=/usr/local/unixODBCmakemake install#### build the ODBCinst.ini and ODBC.ini files## using the same info from the working servercd /usr/local/unixODBC/bin/./ODBCinst -i -d -f template_file./ODBCinst -i -s -f template_file1 - - - - - - template_file - - - - - - - - -[MyODBC]Decription = MyODBCDriver = /usr/local/unixODBC/lib/libmyODBC.soSetup = /usr/local/unixODBC/lib/libODBCmyS.so - - - - - - - - - - - - - - - - - - - - - - - - - - - template_file - - - - - - - - -[MySQLone]Description = myODBCDriver = /usr/local/unixODBC/lib/libmyODBC.soTrace = YesTraceFile = sql1.log# need IP address for the server belowServer = 192.168.168.1User = martinPassword = number9Port = 3306Socket =Database = band# repeat for each server[MySQLtwo] - - - - - - - - - - - - - - - - - - - - -# - - - - - - My SQL setup - - - - - - - - - -Using the MySQL area Webminhttp://www.webmin.com/webmin/On each server I added a- db called band- table called BeatlesWith varchar 30 fields: Name and instThen I pasted into the 'Execute SQLINSERT INTO Beatles VALUES('George','Lead');INSERT INTO Beatles VALUES('John','Rhythm');INSERT INTO Beatles VALUES('Paul','Bass');INSERT INTO Beatles VALUES('Ringo','Drums'); and on each server its nameINSERT INTO Beatles VALUES('Server','NumberOne'); - - - - - - - - - - - - - - - - - - - - -# WebCat html page: one per server - - - - - - testone.tpl - - - - - - - - - - [thisurl]
[sql dsn=MySQLone&username=martin&password=number9&statement=SELECT * FROM Beatles;] Found [NumFound] items
[founditems] Name = [Name], inst = [inst]
[/FoundItems][/sql] DONE QUERY MySQL
- - - - - - - - - - - - - - - - - - - - -I wanted to be complete enough so that others could try the same setup.TIA- JimSalvatore D'Anna ************WebDNA*************Smith Micro Software Developer Resource CenterSales Engineer http://WebDNA.SmithMicro.com(949)360-8587 sdanna@smithmicro.com ************WebDNA************* -----Original Message-----From: Clint Davis [mailto:cdavis@grayloon.com]Sent: Tuesday, May 06, 2003 5:34 AMTo: WebDNA-Talk@talk.smithmicro.comSubject: Re: WebDNA and SQLNitai,I'm running this combo under OSX 10.2.4, but I can't give you a step by stepprocedure because it took me a couple of tries to get it working.I'm using MySQL 3.23.55 with the built-in OSX ODBC app. Make sure you setupMySQL with a username and password for use by WebDNA. Also, make sure yousetup your DSNs in the ODBC app.I'll provide more info when I get into the office.On 5/6/03 2:35 AM, Nitai @ ComputerOil wrote:> I somehow got stuck with ODBC and MySQL. I got MySQL running and all is> working fine, just cant get ODBC talk to MySQL. Also MyODBC is installed,> but unixODBC does only make with errors and alike.> > Would anybody be so kind and tell me in a step like way how to do it, or> give me a URL so I can find it out?---------------------------------------------------------------------Clint DavisWebmaster / Interactive Media SpecialistGray Loon Marketing Group, Inc. http://www.grayloon.com204 Main Street | Evansville, IN 47708 | Phone:812-422-9999----------------------------------------------------------------------------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail toWeb Archive of this list is at: http://webdna.smithmicro.com/-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
Sal D'anna
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
Re:no [search] with NT (1997)
textarea input- nevermind (2002)
help needed w/ search params (1998)
Macauth: Dates and No Scripting... (1997)
[WebDNA] First-timer feedback (2014)
more ! testing (1997)
TCPSend / Netscape Server 4.1 (2003)
Replace context problem ... (1997)
creator code (1997)
FlushDatabase Suggestion (1998)
How About Credit Card Transactions (1998)
OT - asp snippet similar to [!][/!] (2003)
Banners and sort of random display (1997)
Upload Plugin (1998)
Commas in search (1998)
[showif],[refferer],[include] in errormessages.db (2002)
[QuantityPrice] Not working in WebCatNT 2.0.1??? (1997)
Introduction/Tutorial/QuickStart (1997)
Forcing a NEWCART (1997)
Stopping bad HTML propagation ? (1997)