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 (or something)? 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 something wrong 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 term window to avoid typos and be consistent across all 4 servers. - Using exact same odbc.ini and WebCatalog templates, the 2 working servers and talk to all 4 test databases. (one of them is local) - The 4 databases are the same with an extra record containing the server name - 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 on Windows ## 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 this 1) 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 which is returned for all other SQL problems SQL Error: 00000 Playing 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 software ncftpget ftp://mirror.sit.wisc.edu/mirrors/mysql/Downloads/MySQL-3.23/MySQL-3.23.38-1 .i386.rpm ncftpget ftp://mirror.sit.wisc.edu/mirrors/mysql/Downloads/MySQL-3.23/MySQL-client-3. 23.38-1.i386.rpm ncftpget ftp://mirror.sit.wisc.edu/mirrors/mysql/Downloads/MySQL-3.23/MySQL-shared-3. 23.38-1.i386.rpm ncftpget ftp://mirror.sit.wisc.edu/mirrors/mysql/Downloads/MySQL-3.23/MySQL-devel-3.2 3.38-1.i386.rpm ncftpget ftp://mirror.sit.wisc.edu/mirrors/mysql/Downloads/MyODBC/MyODBC-2.50.37.tar. gz lynx http://www.unixodbc.org/unixODBC-2.0.6.tar.gz## install the RPMs rpm -Uvh MySQL-shared-3.23.38-1.i386.rpm rpm -Uvh MySQL-devel-3.23.38-1.i386.rpm rpm -Uvh MySQL-client-3.23.38-1.i386.rpm rpm -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 compile mv 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.gz tar 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 hour make make install cd /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/unixODBC make make install #### build the odbcinst.ini and odbc.ini files ## using the same info from the working server cd /usr/local/unixODBC/bin/ ./odbcinst -i -d -f template_file ./odbcinst -i -s -f template_file1 - - - - - - template_file - - - - - - - - - [Myodbc] Decription = Myodbc Driver = /usr/local/unixODBC/lib/libmyodbc.so Setup = /usr/local/unixODBC/lib/libodbcmyS.so - - - - - - - - - - - - - - - - - - - - - - - - - - - template_file - - - - - - - - - [MySQLone] Description = myodbc Driver = /usr/local/unixODBC/lib/libmyodbc.so Trace = Yes TraceFile = sql1.log # need IP address for the server below Server = 192.168.168.1 User = martin Password = number9 Port = 3306 Socket = Database = band# repeat for each server [MySQLtwo] - - - - - - - - - - - - - - - - - - - - -# - - - - - - My SQL setup - - - - - - - - - -Using the MySQL area Webmin http://www.webmin.com/webmin/ On each server I added a - db called band - table called Beatles With varchar 30 fields: Name and instThen I pasted into the 'Execute SQL INSERT 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 name INSERT 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 Center Sales 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 AM To: WebDNA-Talk@talk.smithmicro.com Subject: Re: WebDNA and SQL Nitai,I'm running this combo under OSX 10.2.4, but I can't give you a step by step procedure 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 setup MySQL with a username and password for use by WebDNA. Also, make sure you setup 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 Davis Webmaster / Interactive Media Specialist Gray Loon Marketing Group, Inc. http://www.grayloon.com 204 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 to Web 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:

    
  1. WebDNA and SQL - encrypted passwords ( Larry Hewitt 2006)
  2. Re: WebDNA and SQL (Jay Van Vark 2003)
  3. Re: WebDNA and SQL (Dale's Stuff 2003)
  4. Re: WebDNA and SQL (Gary Krockover 2003)
  5. Re: WebDNA and SQL (Alain Russell 2003)
  6. Re: WebDNA and SQL (Phillip Bonesteele 2003)
  7. Re: WebDNA and SQL (Alain Russell 2003)
  8. Re: WebDNA and SQL (Alain Russell 2003)
  9. Re: WebDNA and SQL (Clint Davis 2003)
  10. Re: WebDNA and SQL (Alain Russell 2003)
  11. Re: WebDNA and SQL (Sal D'anna 2003)
  12. Re: WebDNA and SQL (Clint Davis 2003)
  13. Re: WebDNA and SQL (Jay Van Vark 2003)
  14. Re: WebDNA and SQL (Jay Van Vark 2003)
  15. Re: WebDNA and SQL (Nitai @ ComputerOil 2003)
  16. Re: WebDNA and SQL (Alain Russell 2003)
  17. Re: WebDNA and SQL (Clint Davis 2003)
  18. Re: WebDNA and SQL (Nitai @ ComputerOil 2003)
  19. Re: WebDNA and SQL (Gary Krockover 2003)
  20. Re: WebDNA and SQL (Nitai @ ComputerOil 2003)
  21. Re: WebDNA and SQL (Alain Russell 2003)
  22. Re: WebDNA and SQL (Nitai @ ComputerOil 2003)
  23. Re: WebDNA and SQL (Alain Russell 2003)
  24. Re: WebDNA and SQL (Nitai @ ComputerOil 2003)
  25. Re: WebDNA and SQL (Alain Russell 2003)
  26. WebDNA and SQL (Nitai @ ComputerOil 2003)
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 (or something)? 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 something wrong 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 term window to avoid typos and be consistent across all 4 servers. - Using exact same ODBC.ini and WebCatalog templates, the 2 working servers and talk to all 4 test databases. (one of them is local) - The 4 databases are the same with an extra record containing the server name - 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 on Windows ## 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 this 1) 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 which is returned for all other SQL problems SQL Error: 00000 Playing 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 software ncftpget ftp://mirror.sit.wisc.edu/mirrors/mysql/Downloads/MySQL-3.23/MySQL-3.23.38-1 .i386.rpm ncftpget ftp://mirror.sit.wisc.edu/mirrors/mysql/Downloads/MySQL-3.23/MySQL-client-3. 23.38-1.i386.rpm ncftpget ftp://mirror.sit.wisc.edu/mirrors/mysql/Downloads/MySQL-3.23/MySQL-shared-3. 23.38-1.i386.rpm ncftpget ftp://mirror.sit.wisc.edu/mirrors/mysql/Downloads/MySQL-3.23/MySQL-devel-3.2 3.38-1.i386.rpm ncftpget ftp://mirror.sit.wisc.edu/mirrors/mysql/Downloads/MyODBC/MyODBC-2.50.37.tar. gz lynx http://www.unixODBC.org/unixODBC-2.0.6.tar.gz## install the RPMs rpm -Uvh MySQL-shared-3.23.38-1.i386.rpm rpm -Uvh MySQL-devel-3.23.38-1.i386.rpm rpm -Uvh MySQL-client-3.23.38-1.i386.rpm rpm -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 compile mv 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.gz tar 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 hour make make install cd /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/unixODBC make make install #### build the ODBCinst.ini and ODBC.ini files ## using the same info from the working server cd /usr/local/unixODBC/bin/ ./ODBCinst -i -d -f template_file ./ODBCinst -i -s -f template_file1 - - - - - - template_file - - - - - - - - - [MyODBC] Decription = MyODBC Driver = /usr/local/unixODBC/lib/libmyODBC.so Setup = /usr/local/unixODBC/lib/libODBCmyS.so - - - - - - - - - - - - - - - - - - - - - - - - - - - template_file - - - - - - - - - [MySQLone] Description = myODBC Driver = /usr/local/unixODBC/lib/libmyODBC.so Trace = Yes TraceFile = sql1.log # need IP address for the server below Server = 192.168.168.1 User = martin Password = number9 Port = 3306 Socket = Database = band# repeat for each server [MySQLtwo] - - - - - - - - - - - - - - - - - - - - -# - - - - - - My SQL setup - - - - - - - - - -Using the MySQL area Webmin http://www.webmin.com/webmin/ On each server I added a - db called band - table called Beatles With varchar 30 fields: Name and instThen I pasted into the 'Execute SQL INSERT 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 name INSERT 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 Center Sales 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 AM To: WebDNA-Talk@talk.smithmicro.com Subject: Re: WebDNA and SQL Nitai,I'm running this combo under OSX 10.2.4, but I can't give you a step by step procedure 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 setup MySQL with a username and password for use by WebDNA. Also, make sure you setup 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 Davis Webmaster / Interactive Media Specialist Gray Loon Marketing Group, Inc. http://www.grayloon.com 204 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 to Web 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:

carriage returns in data (1997) WebCat2b15MacPlugin - [protect] (1997) Seeking Better Display of results... (1997) Signal Raised (1997) NT error logs (1997) Locking up with WebCatalog... (1997) More on the email templates (I like it) (1997) [Sum] function? (1997) WebCatalog [FoundItems] Problem - AGAIN - (1997) What Country (2004) problems with WebCat-Plugin (1997) WebCat2b13MacPlugIn - [showif][search][/showif] (1997) Items XX to XX shown (1997) Country & Ship-to address & other fields ? (1997) New commands in Final candidate (1997) WebCAT MacOS9 --> OSX (2003) How to search for fields with 10 or more characters? (2004) Problems getting parameters passed into email. (1997) So, does anyone have developer editon running on Win XP (2006) searching a range (2000)