PDA

View Full Version : unixODBC and MySQL



chriscowley
3rd July 2006, 01:06 PM
I've just joined and I have also just moved away from the world of M$ completely, now being reliand purely on FC5 (64bit).

The only thing that is buggine me is that I need to get get OpenOffice2 connected to my client database.

The database is in MySQL4.0.26 on my server (FC4). I know I need to use unixODBC and MySQL connector. Both are installed (via yum). I am completely stumped with on how to get them to work

The only driver that unixODBC has is the PostgreSQL driver. How do I add the MySQL driver to unixODBC? Once I have that driver installed, is setting the rest of the ODBC/DSN connection obvious (I am using using the front-end in KDE)?

It is absolutlely essential that I get this done, if not then I will unfortunately have to go back to Windows :mad: and fast.

markkuk
3rd July 2006, 03:37 PM
Run ODBCConfig as root to add the MySQL driver: open the Drivers tab, click "Add", write a suitable name and description, select the libmyodbc file from mysql-connector-odbc as the driver(64) and libodbcmyS from unixODBC as the Setup(64) file. I have a 32 bit system, so you must check the actual paths on your system with rpm -ql. Now you can set up User DSNs as a normal user.

chriscowley
3rd July 2006, 03:43 PM
can you give an example of how to use rpm -ql?

I run it and just get:
"rpmq: no arguments given for query"

markkuk
3rd July 2006, 04:27 PM
rpm -ql <packagename> e.g:
rpm -ql mysql-connector-odbc

chriscowley
3rd July 2006, 06:32 PM
problem solved now, nut I still cannot get OpenOffice-Base to connect. I can see my database in DataManager, but when I try and connect through OpenOffice. I get this errror:

"SQL Status: IM002

[unixODBC][Driver Manager]Data source name not found, and no default driver specified"

As I say, it connect through DataManager. What it OOo doing differently?