[prev in list] [next in list] [prev in thread] [next in thread] 

List:       applixware-list
Subject:    Applix 4.4.1 and mySQL setup instructions
From:       "Robert Kesterson" <robertk () robertk ! com>
Date:       1999-01-05 19:37:36
[Download RAW message or body]

This has probably been covered before, but I spent a good deal of time 
searching through the mailing list and dejanews archives without success. 
So, after some frustration and taking info from here and there, I finally 
came up with a working integration of Applix 4.4.1 and mySQL via ODBC 
on local tables on my RedHat 5.2 system.  I undid it and redid it a couple 
of times to make sure it really works, and it does, at least for me.  So 
here's the scoop:  

Assumptions: 

Applix is installed and working in /opt/applix
mySQL is installed and working 

1) Download and apply all patches from the applixware errata if you have 
not already done so.  

2) As root, edit the file /opt/applix/axdata/axnet.cnf.  Look for two lines in 
the file that start with "libFor elfodbc" and "setenvFor elfodbc".  If these 
lines are commented out, uncomment them and change them to read:  

   libFor elfodbc /opt/applix/axdata/axshlib/lib
   setenvFor elfodbc /opt/applix/axdata/axshlib

3)  Make a symlink from your mysql.sock file, wherever it is, to 
/tmp/mysql.sock.  On my system, which has mySQL installed in its 
default location (from the supplied makefiles), this required the command:  

     ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock

4)  As root, edit your /etc/services file and if necessary, add a line that 
reads:  

      axnet 9425/tcp

5) Create a file named ".odbc.ini" in your home directory.  Ignore everything 
you've heard or read about how to set this file up.  For purposes of Applix 
Data, the only things it seems to care about are lines of the form:  

      [dbname]
      Driver=/opt/applix/axdata/axshlib/drivers/libmyodbc_mysql.so

You can (and probably will) have multiple entries like this.  What happens 
is that whatever you put for "dbname" must be the name of a database in 
mySQL.  For example, if you log into mysql using the text-based client 
and do a "show databases", it may return something like:  

   +----------+
   | Database |
   +----------+
   | test     |
   | mydata   |
   | moredata |
   +----------+

These database names are what you can use in the .odbc.ini file.  So, to 
access all of the above mySQL databases, you would need an .odbc.ini file 
that looked like this:  

      [test]
      Driver=/opt/applix/axdata/axshlib/drivers/libmyodbc_mysql.so

      [mydata]
      Driver=/opt/applix/axdata/axshlib/drivers/libmyodbc_mysql.so

      [moredata]
      Driver=/opt/applix/axdata/axshlib/drivers/libmyodbc_mysql.so

6) Start Applix, go into Data, pull down the "Query" menu and select 
"Choose Server".  Choose the ODBC tab, then in the space where it asks 
for "DataSource", enter one of the database names from your .odbc.ini 
(that would be either test, mydata, or moredata in the example above).  
Don't enter anything for "Host".  (If you want to set up multiple entries, just 
click "Add" and repeat this process for each database.)  You can then 
highlight the data source and click "OK" and you should get a login prompt 
for mySQL.  Enter your mySQL username and password and you should 
be connected.  Once connected, you can then use the query menu to 
choose tables, the edit menu to enable editing, and so forth, just as you'd 
expect.   

This is offered for whatever it's worth.  I'm no expert in Applix or in ODBC, 
but the above steps *do* make it work on my system.  Your mileage may 
vary.  :-)  


==========================================
Robert Kesterson           www.robertk.com
robertk@robertk.com

Thought for the day:
    Book (n): a utensil used to pass time while waiting
    for the TV repairman.


--
To unsubscribe from the list, send "unsubscribe applixware-list" in the
body of a message to majordomo@applix.com.  Before you ask a question,
check out the Applixware for Linux FAQ, Errata, and mailing list
archives at http://linux.applixware.com/ under "Applix Resources."

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic