linux WebCatalog ODBC MySQL

This WebDNA talk-list message is from

2001


It keeps the original formatting.
numero = 36609
interpreted = N
texte = Hi, This is a start of a mini HowTo for getting linux WebCatalog and ODBC to work with MySQL It's a work in progress. The ODBC part worked only on 2 of 4 servers. Q: Do I have a config problem with unixODBC or MyODBC ? Q: Is there a way for force the ODBC Libraries to reload / reset (or something)? 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). 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.23.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 an 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.I hope to turn this into a mini HowTo that works for all WebCat linux users. TIA- Jim ------------------------------------------------------------- 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://search.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. linux WebCatalog ODBC MySQL (Jim Lanford 2001)
Hi, This is a start of a mini HowTo for getting linux WebCatalog and ODBC to work with MySQL It's a work in progress. The ODBC part worked only on 2 of 4 servers. Q: Do I have a config problem with unixODBC or MyODBC ? Q: Is there a way for force the ODBC Libraries to reload / reset (or something)? 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). 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.23.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 an 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.I hope to turn this into a mini HowTo that works for all WebCat linux users. TIA- Jim ------------------------------------------------------------- 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://search.smithmicro.com/ Jim Lanford

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:Hideif / Showif (1998) [searchString] (1997) [WebDNA] OT: FCKeditor (2008) Sendmail problem (2002) Memory leak with text variables (1998) [SearchString] problem with [search] context (1997) Big Databases (1997) Plugin or CGI or both (1997) emailer (1997) WebCatalog2 Feature Feedback (1996) WebCatalog2 Feature Feedback (1996) Emailer 1.0.2 Conflicts? (1998) URGENT! ACGI Stopped!!!! (1997) This list needs a digest: rant, rave... (1997) HELP WITH DATES (1997) Re:2nd WebCatalog2 Feature Request (1996) Windows 2.1b2 Append Bug? (1997) [Announce]: Web server security and password protection (1997) Re:Dumb Question about Docs (1997) [referrer] tag (1997)