|
|
C Access
2 questions:
- How do I access MySql from within a C/C++ program (without invoking
the unix shell, i.e. without calling "system" or "popen"?
- How do I tell MySql I want my database to be stored in a specific
location on my file system?
|
|
0
|
|
|
|
Reply
|
lalawawa
|
6/24/2010 1:40:58 AM |
|
lalawawa wrote:
> 2 questions:
>
> - How do I access MySql from within a C/C++ program (without invoking
> the unix shell, i.e. without calling "system" or "popen"?
http://dev.mysql.com/doc/refman/5.5/en/dynindex-cfunction.html
> - How do I tell MySql I want my database to be stored in a specific
> location on my file system?
http://dev.mysql.com/doc/refman/5.5/en/ha-drbd-install-mysql.html
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
|
|
0
|
|
|
|
Reply
|
jstucklex (14363)
|
6/24/2010 3:25:29 AM
|
|
>- How do I access MySql from within a C/C++ program (without invoking
>the unix shell, i.e. without calling "system" or "popen"?
Link with libmysqlclient and code calls using the C or C++ API into
your program. See the section of the MySQL manual on the programming
APIs.
>- How do I tell MySql I want my database to be stored in a specific
>location on my file system?
You don't really get fine-grained control over this. You can set
datadir (in my.cnf) to set the location of the whole tree of
databases. You can locate an individual (MyISAM) database elsewhere
by replacing a subdirectory of datadir with a symlink to a directory
placed where you want it to go. (Careful about preserving ownerships
and permissions if you do such a copy, and do it when the server
isn't running.)
|
|
0
|
|
|
|
Reply
|
gordonb
|
6/24/2010 3:26:51 AM
|
|
lalawawa <usenet@ccjj.info> wrote:
>
> - How do I access MySql from within a C/C++ program (without invoking
> the unix shell, i.e. without calling "system" or "popen"?
There is a bunch of "connectors" available to use MySQL from many
programming languages. The C API (also known as libmysqlclient) is
used very often. Connector/C is just a freestanding implementation of
the same. The C++ API is from MySQL^WSun^WOracle, and Connector/C++
is a community project.
http://dev.mysql.com/doc/refman/5.1/en/connectors-apis.html
> - How do I tell MySql I want my database to be stored in a specific
> location on my file system?
The datadir option has been named already. There are also options for
CREATE TABLE to put MyISAM files outside $datadir. And the shared
InnoDB tablespace can also be put outside the $datadir.
http://dev.mysql.com/doc/refman/5.1/en/server-options.html
http://dev.mysql.com/doc/refman/5.1/en/create-table.html
http://dev.mysql.com/doc/refman/5.1/en/innodb-parameters.html
XL
|
|
0
|
|
|
|
Reply
|
axel.schwenke (487)
|
6/24/2010 7:11:33 AM
|
|
|
3 Replies
211 Views
(page loaded in 0.101 seconds)
Similiar Articles: how to read Microsoft Access MDB file, using C, from Solaris ...I'm trying to write a C program to read an Access MDB file and convert it to an ASCII text file. Does anyone how I can go about doing this, or if ther... Attempted to access c(2); index out of bounds because numel(c)=1 ...hi I'm student in korea and I don't understand "index out of bounds because numel(c)=1." I'm needs your help 1) objetfunction (variable x1,x2... masm within VisualC++ question (accessing external global ...Hi! I've following masm-code and within that I want to access the global (declared externally in a c++-file) variables BitsLeft and N. According t... Which has faster access Binary Search of std::vector or std::set ...Which has faster access Binary Search of std::vector or std::set ??? I would gess that the former might be slightly faster and take less memory. ... Changing access specifiers during inheritance - comp.lang.c++ ...Hi all, I am wondering why the language allows a programmer to inherit from a base class that contains virtual functions (either pure virtual or no... Accessing BTrieve database from Visual C++/Visual Basic - comp ...Hi! I have been looking on the pervasive website but things don't get really clear to me. Does anybody know how to access a betrieve database from ... Netgroup Access problem (PASSWD) - comp.sys.sun.adminHi We have a NIS Master "M" (Solaris8 HW07/01) and a NIS Client "C" (Solaris9 HW09/04). M: /etc/netgroup -> "onlyuser (-,dupa,-)" C: /etc/nsswitch.... Accessing Pervasive 2000i Btrieve with Borland C++ PDAC - comp ...Hi, I search to access to my Pervasive Databases and i can do it by creating Database definition on my server and setting it in PvSession. My probl... error:Attempted to access F2(6); index must be a positive integer ...Attempted to access c(2); index out of bounds because numel(c)=1 ... error:Attempted to access F2(6); index must be a positive integer ..... out of bounds because numel(c ... convert access 2007 to access 2003...cannot save - comp.databases ...I was given a tracking database that some exec did. its an access 2007 database. I was told to convert it to 2003. BUT I get cannot save features t... C'Access Inc: Capture, Streaming and Collaborative Technologies ...C'Access Inc: Capture, Streaming and Collaborative Technologies for All Sign In : C-Access - New York City Campaign Finance BoardC-Access is the CFB’s interactive website for campaigns, providing secure online access to campaign information. Check the status of financial disclosure ... 7/8/2012 3:20:30 PM
|
|
|
|
|
|
|
|
|