tags:

views:

61

answers:

1

I usually put MAMP MySQL /db/db-site-name folder under SVN.
When MAMP starts, it gives the drw------- (600) permission to all the files and dir in that folder. I have a problem because one of these folder is .svn one, that have to be drwxr-xr-x (755), otherwise I can't access to SVN working copy with my client.

Can anyone help me to set MAMP properly?

A: 

You're sharing the MySQL data files with multiple users? That's inherently unsafe. There's no guarantee that someone copying out the raw data files will get a consistent copy. Consider the case of a large data store that takes a long time to actually copy:

  1. User A starts copying the MySQL data files
  2. While the copy is progressing, User B does some action which causes MySQL to update that file (an update or insert or delete operation, say).
  3. Part of the data update is done near the start of the file, which has ALREADY BEEN COPIED
  4. The other part of the data update is near the end of the file, which has NOT YET BEEN COPIED
  5. User B goes on working as usual
  6. User A completes the file copy, and now has a corrupted file - it only has half of User B's changes in it

Is there any reason the other developers can't access the database server remotely via TCP? It's a trivial configuration change to your database connection calls to access a remote server, instead of a local one.

If you must provide the other developers with their own copies of the files, consider sharing a dump of the data rather than the database files themselves. mysqldump can trivially produce a plaintext dump file that can easily be shared with other developers, which they can then import to their own MySQL instances

Marc B
Thanks, i think you're right. I have to find another way to share the database within the member of one project. Probably the only one solution is to use mysqldump.
SergioP