views:

87

answers:

5

Hi all, Is it possible to use MySQL local? I mean NOT at a server. I read a lot about MySQL on a webserver with PHP, Joomla etc.

I want to program a piece of software and use a database local to store results. Can I use MySQL for that?

If so, is ther anyware on the net a good tutorial how to do that?

+1  A: 

You can install MySQL on your workstation, it doesn't need to be on a "server" per se. You still need to use something that can connect to it. From a Java application, for instance, you'd use JDBC; from .Net, you'd probably use ADO.Net; etc.

As far as I know, it will still want to have its server process (mysqld) running and for you to connect to that process via sockets and the like; there's no standard in-process version that I'm aware of. (The server can be listening only on the local interface, though.) There are several alternatives if you want in-process stuff, such as SQLite and HSQLDB.

Of course, if you're feeling really enterprising, there's the open source version of MySQL, which means you could compile it into your app (if you're using C or something that can link to it), but I suspect that's going rather too far. :-)

T.J. Crowder
A: 

Yes, works like a charm for this.

Mysqls homepage has lots of info for this.

Bjorn J
A: 

use SQLite. it is a popular embedded database. It can be deployed via XCopy and no server installs.

But it can only be used locally. i.e if you later on decide to allow remote access, then you will need to migrate it to MySQL or other databases.

SysAdmin
A: 

If you don't want to install a server, you may be interested into Sqlite! It's the most widely deployed embedded database, and it's Public Domain. http://www.sqlite.org/

Firebird is also an alternative. It's fully ACID-compliant and runs under the Interbase Public License. http://www.firebirdsql.org/

HED
I have good experiences with FireBird, which can do both embedded and client/server.
reinierpost
edited my post.
HED
A: 

Try xampplite - it will painlessly install MySQL for you (on your local windows machine) as well as apache, php and a few other web apps if you need them.

Andy