SylvainTI / phpliteadmin

Automatically exported from code.google.com/p/phpliteadmin
0 stars 0 forks source link

description how to administer different databases #255

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Please add this to the README:

To administer your database, you should create a subfolder ./data/ and link 
your database into that folder, for example:

ln -s /var/www/owncloud/data/owncloud.db ./data/owncloud.db

this way you can administer several databases in one instance

Original issue reported on code.google.com by rubens.androidhandy on 17 Jun 2014 at 1:18

GoogleCodeExporter commented 9 years ago
Hmm. I am not really sure. You assume:
- a linux server
- a user with ssh access
- that the db is already somewhere else on the server and not a copy but the 
actual db should be modified

The user could also be using Windows Server, have only FTP access and so on. 
Why should we explain linux symlinks? We could also explain how to create hard- 
or softlinks in NTFS, which is possible as well. But I guess our Readme is not 
the place to teach people how they use their operating system.

And on top of that, using symlinks is a bit dangerous with SQLite as it creates 
it's journal in the folder of the DB you opened. From the SQlite manual:

"If there are multiple (hard or symbolic) links to a database file, the journal 
will be created using the name of the link through which the file was opened. 
If a crash occurs and the database is opened again using a different link, the 
hot journal will not be located and no rollback will occur." [1]

This is usually not an issue, but you should be aware of things like this. And 
writing it in the Readme without saying anything about this is also not a good 
idea in my opinion.

By the way, this has nothing to do with managing multiple dbs in one instance. 
You can manage multiple dbs with phpliteadmin without symlinks. Just drop them 
in the same folder as phpliteadmin. Or write their location in the 
configuration ($databases) if they should stay in different folders. No 
symlinks required.

[1] http://sqlite.org/atomiccommit.html

Original comment by crazy4ch...@gmail.com on 17 Jun 2014 at 1:58

GoogleCodeExporter commented 9 years ago

Original comment by crazy4ch...@gmail.com on 3 Jan 2015 at 11:17