ODBC anyone?

Not sure if this is the right forum. But...

I need to connect to a web based database I run using MySQL. I downloaded the MySQL ODBC driver from mysql.com, ran the installer (several times) successfully - so the installer tells me. But when I launch ODBC Administrator no drivers appear. There is no documentation (other than "run the installer" and all will be good).

I cannot find any driver files, and the odbc.ini files are pretty much blank. Nothing in the System Library, nothing in my user library. Any idea where those files go to and why ODBC Admin can't find them?

Thanks,

Bob Luttman

iBook, Mac OS X (10.4.3)

Posted on Nov 15, 2005 2:57 PM

Reply
13 replies

Nov 16, 2005 9:30 AM in response to Bob Luttman1

Bob--

Have you looked at the article at O'Reilly yet? It's older (Jaguar), but it might have some useful hints, especially in the comments on the second page.

Unless you really need ODBC connectivity for a specific reason, you might look into other means of connecting. I use CocoaMySQL for some kinds of tasks. And sometimes, I just use the command-line mysql client over the network. Some people also swear by PHPMyAdmin, but I've never used that.

HTH,

charlie

Nov 16, 2005 11:14 AM in response to Charles Minow

I have two reasons. I run a web site with a large mysql database on it that I would like to connect to a filemaker version on my computer to keep them synched. Second, and more importantly, my users/clients want a similar capability so I want to experiment with this connectivity (they are nearly all on windows and scattered across the country).

I read the o'reilly article, as well as others, and they all say the same thing. The problem is that I have no idea where the installer is actually putting the drivers. I cannot find them, nor are the odbc.ini and obdcinst.ini files getting updated. Where are the files going? The installer says its successful, but they are not there.

Bob

Nov 16, 2005 1:02 PM in response to Bob Luttman1

I have two reasons. I run a web site with a large
mysql database on it that I would like to connect to
a filemaker version on my computer to keep them
synched.


OK. That makes total sense. I figured it had to be something like that. I tried looking at the MySQL web site and I'm getting all kinds of 403 and 404 http errors. However, I've found a thread at MySQL's forums that would indicate that at least one version of the MyODBC drivers never worked at all under Tiger. One of the posts has a link to a solution that involves making changes to the source code and recompiling.

On the other hand, if it were me, I'd just look at the Actual Technologies driver. It's not free, which is a drag, but you can at least try it out before buying, and at $29.95, it's not terribly expensive.

charlie

Nov 16, 2005 4:08 PM in response to Bob Luttman1

Bob--

Okay, I downloaded MyODBC stuff (3.51.12) from the MySQL web site. The actual driver should be:

/usr/lib/libmyodbc3.dylib


The reason the ODBC administrator isn't making changes to the odbc.ini and odbcinst.ini files is that, at least on my system, they were writted with root as the owner. I can make changes to them once I change the permissions:

sudo chown myusername:myusername ~/Library/ODBC/odbc*


Also, as part of the MyODBC install, two files got written to the "/usr/bin" directory: myodbc3i and myodbc3m.

I need to get moving on something else for a few hours, but that might help get you a little farther.

best,

charlie

Nov 17, 2005 1:24 PM in response to Charles Minow

After poking around in /usr/lib/ and other places I did find some stuff. The driver is installed in /usr/lib/ but the setup file doesn't seem to be anywhere. This makes it very difficult to actual setup and test the connection. You can tinker with that manually, but testing it is probably a pain. The nice GUI interface (See Mac OSX Tiger Unleashed from Sam's Publishing) is non-existent.

When I try to use the driver (in OpenOffice's spreadsheet) I get:

[iODBC][Driver Manager]dlopen(/usr/lib/libmyodbc3.dylib, 6): Library not loaded: /usr/lib/libltdl.3.dylib
Referenced from: /usr/lib/libmyodbc3.dylib
Reason: image not found

Not sure where to go from here. I think I'll try the other driver mentioned above and see what happens.

Thanks,

Bob

Nov 17, 2005 2:42 PM in response to Bob Luttman1

I think I'll try the other driver mentioned above and see what happens.


You know what? I tried the Actual Technologies one with Excel and it worked right away! I think it's partly because the setup wizard is soooo much easier that I got a DSN right away. Plus, it made the MySQL driver work in Excel too!

I didn't even see the MySQL drivers listed in Excel until I installed the Actual Technologies drivers. That I think is because Excel is a CFM application, so there's some iODBC CFM library that needs to be installed, and it gets installed by the Actual Technologies driver.

Anyway, definitely try the Actual Tech. drivers...

charlie

Nov 17, 2005 3:10 PM in response to Bob Luttman1

Glad it's getting there.

I am still having trouble connecting, but that is an
issue between me and the ISP hosting the database. I
am not sure I have the right IP address or port
number.


Also, you'll have to have the proper privileges for the remote machine on the database in question. So, depending on the ISP, you might have to have them set it up for you. But it definitely works across my LAN to pull data from MySQL on one machine to Excel on another once I gave myself SELECT privileges on the database in question...

cheers,

charlie

Dec 11, 2005 1:17 PM in response to Bob Luttman1

I was successful in getting ODBC connectivity working between a MySQL database server, Apple's ODBC Administrator and OpenOffice.org's database component. I'm using Mac OS X 10.4.3 and OpenOffice.org 2.0 (OOo2) in the X11 environment. These instructions may help others do the same thing.

I will assume that you already have a working MySQL server.

Download mysql-connector-odbc-3.51.12-apple-darwin8.2.0-powerpc.pkg from www.mysql.com and install the package.

Next, open ODBC Adminstrator. Go to the "Drivers" tab. The MySQL ODBC 3.51 Driver should be there. The default location for the driver is: /usr/lib/libmyodbc3.dylib , make sure this is the case. Use the "Configure..." button if you need to make changes.

Note: It is important to UNLOCK the lock icon in the lower left side of the main ODBC Administrator window. You'll need your Mac OS adminsistrator password for this. If you do not unlock, any changes you make to the configuration will not be saved.

Go to the "User DSN" tab. Click on the entry in the window to select it then, click on the "Configure..." button. The Data Source Name (DSN) will be already filled in: myodbc. Change this to something more descriptive, I used the MySQL databasename that I will connect to. In the next text box, enter a short description of that database.

Below, in the same window, there should be a single Key/Value entry however, you'll need more than this to make this all work. The single Key/Value pair should be: SERVER/localhost. This is fine, leave it there and enter three more Key/Value pairs.

Click on the "Add" button. Add a DATABASE key. For its value, enter the name of a MYSQL database on your local server. Click the "Add" button again to add USER/<mysqlusername> and PASSWORD/<mysqluserpassword> Key/Value pairs. Make sure that you apply your changes with the "Apply" button, or Save them when you quit ODBC Administrator.

Now, go ahead an open OOo2. Open a new Database document, the Database Wizard will appear. Select the "Connect to an existing database" radio button. In the pulldown menu, select the "MySQL" menu item. Click the Next button.

In this window select the "Connect using ODBC" radio button. Click the Next button.

In this (third) window, click on the "Browse" button. The "User DSN" that entered a couple of steps ago should appear. Select it and click "OK". Then, go on to the next window.

In this window enter the USERNAME value ("root" in my case) that you entered in ODBC Administrator. Put a checkmark in the "Password required" checkbox. Go to the next window.

On this final window I left everything at the default values. Click on the "Finish" button. A "Save" dialog will open. Name and save your new database document.

Now, your document will open. On the left side of the window, the "Forms" icon will be highlighted. Click on the "Tables" icon, an authentication dialog will open. The mysqlusername should already be filled in. Tab down to the "Password" field and enter the password. Click "OK".

The tables in your selected database should appear in the lower part of the window. If this happens, congratulations. Double-clicking on the table names will allow you to browse the contents of your tables.

I haven't learned much about actually working with the data but, at least the connectivity is good between OOo2 and MySQL.

PowerBook G4 12-inch Mac OS X (10.4.3) 1.25GB RAM

Dec 12, 2005 3:31 PM in response to dirk schiemann

I have no explanation for why the driver file did not install into the correct location. I assume that you read the README that came with the ODBC connector. It lists basic information about the three files that are installed. Two are executables that, at this point, I have no idea how to use.

The "driver" was the only one I was concerned with. Does it show up when you open ODBC Administrator.app?

PowerBook G4 12-inch Mac OS X (10.4.3) 1.25GB RAM

Dec 13, 2005 2:16 AM in response to Curtis Tucker

everything seems to be in the right place but the stupid driver doesn't load and I can select it in the ODBC-Admin.app.
I also tried the other version which was described in the o'reilly link above - same result.
well, it looks like I have to invest into the "Actual Open" solution - which was very easy to configure.

On the other hand - I WANT THIS **** THING TO WORK!!!

arrrrrgh - I keep on fighting!!!

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

ODBC anyone?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.