Take the 2-minute tour ×

So we're a few web developers working on their own projects, which we'd like to access remotely, but still work locally (so, LAMP on the server, MAMP on each computer). The benefits include easily working remotely with no latency, having a local backup incase anything happens (includes Time Machine revisions), and sharing the entire project, not just the files.

What I've done is setup each project folder to have a db folder. Then in the /var/lib/mysql I have symlink'd each database to the designated project's db folder. At this point I don't care if it's a DBA "nightmare" so long as it works effectively for us. I'm not so much interested in "alternate solutions" (I've seen most of them, and most of them suck from a usability standpoint - I haven't looked into replication though, but I believe I would have to slave every person's computer and I'm not sure it would work well).

At this point I'm just more curious why the instructions on this page do not work. Does anybody know? http://dev.mysql.com/doc/refman/5.5/en/symbolic-links.HTML

It says I can do exactly what I have done, as long as I don't try to symlink two different databases to the same database - which I've never even attempted. It's just a simple symlink. I checked have_symlink and it's YES. All tables are MyISAM.

lrwxrwxrwx  1 mysql mysql   28 2011-09-12 11:00 site_name1 -> /ude/repo/site-name1/db
lrwxrwxrwx  1 mysql mysql   21 2011-09-12 10:33 site_name2 -> /ude/repo/site-name2/db
lrwxrwxrwx  1 mysql mysql   21 2011-09-12 10:33 site_name3 -> /ude/repo/site-name3/db

Error I'm getting is:

Fatal error: Allowed memory size of 276824064 bytes exhausted (tried to allocate 80 bytes)

Also, I cannot symlink in reverse, because the app I'm using to synchronize our projecs is Unison, which is smart enough to acknowledge symlinks (a good thing). Which means the db needs to contain the legitimate MyISAM files.


share|improve this question
Not sure if this would cause the error, but does the mysql user have access to the /ude/repo/site-nameX/db directories? –  Andy Smith Sep 12 '11 at 18:39
Andy, yup, chmod -R 777, also they are mysql:mysql. I might be going with replication, but I'd still like to know why this doesn't work (on Ubuntu) :) If anyone finds out please do let us know! –  Eric Muyser Sep 13 '11 at 1:29
I should probably run some tests. –  Eric Muyser Sep 13 '11 at 1:30

Your Answer



Browse other questions tagged or ask your own question.