LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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


Reply
  Search this Thread
Old 08-08-2004, 09:53 PM   #1
QtCoder
Member
 
Registered: Aug 2003
Location: USA
Distribution: Slackware 12.0 RC1
Posts: 129

Rep: Reputation: 15
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.
 
Old 08-09-2004, 12:13 AM   #2
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
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.
 
Old 08-09-2004, 07:39 AM   #3
kev82
Senior Member
 
Registered: Apr 2003
Location: Lancaster, England
Distribution: Debian Etch, OS X 10.4
Posts: 1,263

Rep: Reputation: 51
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.
 
Old 08-09-2004, 10:45 AM   #4
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
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
 
Old 08-09-2004, 02:43 PM   #5
eeyoree
Member
 
Registered: Aug 2004
Distribution: Slackware Ten
Posts: 34

Rep: Reputation: 15
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. NoviceW Linux - Networking 17 09-17-2014 02:13 PM
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock welery Linux - Software 19 03-06-2014 07:19 AM
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. suziecorbett Linux - Software 8 10-09-2008 01:52 AM
mysql error Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. Dannux Linux - Software 3 03-24-2006 08:44 AM
Fedora Core 3, MySql Server, mysql started mysql ended OkiTek Fedora 30 01-28-2005 09:15 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:20 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration