LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   Writing an app that uses a mysql database without installing mysql server? (http://www.linuxquestions.org/questions/programming-9/writing-an-app-that-uses-a-mysql-database-without-installing-mysql-server-215180/)

QtCoder 08-08-2004 09:53 PM

Writing an app that uses a mysql database without installing mysql server?
 
Hi.

Is there any way to write an application (for example, I'm writing one with gtkmm and mysql++) that uses a mysql database but doesn't require a mysql server to actually be installed on the system (specifically Windows)?

I want to make the installation of my mysql based application simple for my clients. I don't want them to have to install a MySQL server on their machine, configure it, and so on. I just want them to install my program with no other steps involved.

paulsm4 08-09-2004 12:13 AM

Sure - just install the mysql client on your box (rather than the full-blown mySQL server). It's as simple as that!

PS:
Strictly speaking, you might not even have to explicitly install the official "mysql client" software. Maybe you can get away with just using ODBC or JDBC "middleware". But this will only work if you have the appropriate mysql driver installed with the middleware package.

kev82 08-09-2004 07:39 AM

byQtCoder
s there any way to write an application (for example, I'm writing one with gtkmm and mysql++) that uses a mysql database but doesn't require a mysql server to actually be installed on the system (specifically Windows)?

i just want to check what you mean here, there has to be a mysql server running somewhere, but no, it doesnt have to be on the local machine as long as it is reachable through a socket.

if you want to use mysql++ without a mysql server then this is impossible, it makes no sense.

by the mysql++ manual
The Main Database Handle

This is a class that handles the connection to the Mysql server. You always need at least one of these objects to do anything. It can either create a separate queries object or directly execute queries. The separate query object is the recommended way as it gives you far more power.


however there is software out there that allows you to link all the db code with your application eg sqllite.

paulsm4 08-09-2004 10:45 AM

You need the mysql client library installed on any client host
 
A minor clarification -

If your mysql client app and mysql server are on different hosts, they communicate with each other over TCP/IP (using sockets).

However, you can't just open a socket and start "doing mysql". You generally need the mysql client library installed and configured to communicate between your app and the server.

The *library* will typically be the one who opens the sockets, and who translates your API calls into mysql protocol. You talk to the library; the library "does" the protocol translation and manages the networking transport. This is how PHP works, this is how Perl/DBD works ... and this is generally how any of your applications should work.

So you should plan on locating, installing and configuring an appropriate client library on your client host.

Hope that helps .. PSM

eeyoree 08-09-2004 02:43 PM

there is an embedded mysql server library
if you ever heard sqlite on php, this one act like that

find about it on mysql website http://www.mysql.com/doc/en/libmysqld.html
http://dev.mysql.com/doc/mysql/en/li..._overview.html


All times are GMT -5. The time now is 09:22 AM.