Re: Cocoa and MySql
Re: Cocoa and MySql
- Subject: Re: Cocoa and MySql
- From: "Todd Heberlein" <email@hidden>
- Date: Tue, 28 Aug 2001 09:52:54 -0700
- Organization: Net Squared, Inc.
>
From: Mike Dean <email@hidden>
>
I am specifically interested in accessing mySql on the same machine
>
as the application will run, though obviously it scales up to
>
accessing a remote server. Thanks for any assistance.
MySQL has its own C-based API that you can use. Connection between a
local and remote database server is trivial, it is only an argument you
pass to the function when connecting to the database. The primary
drawback is that the code will need to be re-worked should you switch to
Postgres, Oracle, or some other database.
On MacOS X, to build the client-side library your application will link
against, libmysqclient, (as well as everything else) just use the
typical UNIX style build and install.
% ./configure --prefix=/usr/local/mysql
% make
% sudo make install
Of course, you may prefer a different install location.
By the way, I have used the book "MySQL" by Paul DuBois, and it has a
nice section on the C API to MySQL. It also walks you through the set
up process (granting access to tables, etc).
Todd