ODBC

Andy Choens gunksta at gmail.com
Thu Apr 28 12:57:05 UTC 2005


On 4/28/05, lluishc <lluishc at gmail.com> wrote:
> On 4/27/05, Andy Choens <gunksta at gmail.com> wrote:
> > What are your trying to connect via ODBC?
> >
> I'm trying to connect to mysql and to some own-made old access applications
> 
> 
> > If you are trying to connect OpenOffice to a mysql database, I'll send
> > you a documented version of my files.
> >
> > --andy
> That would be very appreciated. Thanx
> 
> --
> lluishc
> _______________________________________________
> Ubuntu 5.04 in Compaq Presario R3000
> 
> --
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> http://lists.ubuntu.com/mailman/listinfo/ubuntu-users
> 

First, make sure you have mysql, odbc, and myodbc installed.  To set
up ODBC to use the myodbc connection to MySQL, you will need to edit 2
files.  Both files are in /etc.  The files are odbc.ini odbcinst.ini

Also make sure you have your MySQL root password, and the user
password that you will be using the access the tables.  Double check
that your normal user has the necessary permissions to do whatever you
want to do to the schema.  I once had a hard time getting a schema to
open up, and thought it was odbc.  Turns out I never gave myself
permission to view the tables.

I really like the 2 tools that MySQL has published.  Query is weird at
first but quick once you get the hang of it and the Administrator
rules.  If you need help getting administrator to install on your
system let me know.

I have a schema named tlp that I access through OpenOffice locally.  I
don't allow non-local connections because I want my server to be very
secure, and I don't need remote access.  You don't need to configure
the individual tables, ODBC will read them straight in.

Here is my odbcinst.ini
-------------------------------------------------------------------
[MySQL]
Description     = MySQL driver
Driver          = /usr/lib/odbc/libmyodbc.so
Setup           = /usr/lib/odbc/libodbcmyS.so
CPTimeout       =
CPReuse         =
-----------------------------------------------------------------------
You should be able to use this file without any modifications.

Here is my odbc.ini
----------------------------------------------------------------------------
[tlp]
Description     = TLP Connection
Driver          = MySQL
Server          = localhost
Database        = tlp
Port            = 3306
Socket          =
Option          =
Stmt            =
-------------------------------------------------------------------------------

Here of course, you just need to use the name of your schema in
Database = .  The ODBC name for the schema is defined by the [ ] at
the top.  It doesn't have to be the same thing you called the schema
in MySQL, although I find that it's easier to keep everything the
same.

--andy




More information about the ubuntu-users mailing list