Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
08-08-2004, 09:53 PM
|
#1
|
Member
Registered: Aug 2003
Location: USA
Distribution: Slackware 12.0 RC1
Posts: 129
Rep:
|
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.
|
|
|
08-09-2004, 12:13 AM
|
#2
|
LQ Guru
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Rep:
|
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.
|
|
|
08-09-2004, 07:39 AM
|
#3
|
Senior Member
Registered: Apr 2003
Location: Lancaster, England
Distribution: Debian Etch, OS X 10.4
Posts: 1,263
Rep:
|
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.
|
|
|
08-09-2004, 10:45 AM
|
#4
|
LQ Guru
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Rep:
|
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
|
|
|
All times are GMT -5. The time now is 01:20 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|