1

i am in the process of moving the db for mamp to my remove drive and it is almost working i think but whenever i start mamp mysql won't start and if i check the error log i come across this:

110406 23:00:12 mysqld_safe Starting mysqld daemon with databases from /Volumes/WALL-E/db/mysql
110406 23:00:12 [Warning] One can only use the --user switch if running as root

110406 23:00:12 [Note] Plugin 'FEDERATED' is disabled.
110406 23:00:12 InnoDB: The InnoDB memory heap is disabled
110406 23:00:12 InnoDB: Mutexes and rw_locks use InnoDB's own implementation
110406 23:00:12 InnoDB: Compressed tables use zlib 1.2.3
110406 23:00:12 InnoDB: Initializing buffer pool, size = 128.0M
110406 23:00:12 InnoDB: Completed initialization of buffer pool
InnoDB: Unable to lock /Volumes/WALL-E/db/mysql/ibdata1, error: 45
110406 23:00:13  InnoDB: Retrying to lock the first data file
InnoDB: Unable to lock /Volumes/WALL-E/db/mysql/ibdata1, error: 45
InnoDB: Unable to lock /Volumes/WALL-E/db/mysql/ibdata1, error: 45
InnoDB: Unable to lock /Volumes/WALL-E/db/mysql/ibdata1, error: 45
InnoDB: Unable to lock /Volumes/WALL-E/db/mysql/ibdata1, error: 45
InnoDB: Unable to lock /Volumes/WALL-E/db/mysql/ibdata1, error: 45
InnoDB: Unable to lock /Volumes/WALL-E/db/mysql/ibdata1, error: 45
InnoDB: Unable to lock /Volumes/WALL-E/db/mysql/ibdata1, error: 45
InnoDB: Unable to lock /Volumes/WALL-E/db/mysql/ibdata1, error: 45
InnoDB: Unable to lock /Volumes/WALL-E/db/mysql/ibdata1, error: 45
InnoDB: Unable to lock /Volumes/WALL-E/db/mysql/ibdata1, error: 45
InnoDB: Unable to lock /Volumes/WALL-E/db/mysql/ibdata1, error: 45

i also found this question but couldn't seem to find a way to make that work for MAMP, what am i doing wrong, is it a permissions problem ?

PS - Yep, my drive is called WALL-E :)

Community
  • 1
  • 1
David
  • 969
  • 2
  • 11
  • 17

1 Answers1

0

Probably an issue with filesystem level file locking. Try starting Mysql with --skip-locking. Im not sure how to do that with MAMP as I'ver never used it. Look for a place in its preferences where you can supply a custom options for startup.

Alternatively you might be bale to customize the mounting of removable media to enable locks with autofs, but my autofs-fu is weak so i cant give any pointers there.

prodigitalson
  • 60,050
  • 10
  • 100
  • 114
  • i found that in /Applications/MAMP/bin/ there is a startMysql.sh where the command is for starting the mysql server i put the --skip-locking flag there, i even tried the more modern -skip-external-locking and still nothing, i wouldn't know where to start with autofs... – David Apr 07 '11 at 12:42
  • I Would assume perhaps i was worng abotu the file level locking for now and move to researching autofs as a last resort if i were you... well unless youre interested in autofs for other reasons as well :-) Out of curiosity, what FS is running on your USB stick? – prodigitalson Apr 07 '11 at 15:44
  • 1
    It is actually a NAS i have in the office, maybe that could be the problem, not the same file system as my mac, this could be entirely impossible :) – David Apr 07 '11 at 15:48
  • OHHHHHHH... yeah its most definitely the part of the issue... i remeber reading about this in blog posts awhile back (mainly with NFS and AFP though i doubt if SMB/CIFS is a better choice haha)... what protocol are you mounting with? – prodigitalson Apr 07 '11 at 15:50
  • Ok... let me see if i can find the articles i was referring to... "GOOGLE HO!" – prodigitalson Apr 07 '11 at 16:00
  • What drive/volume your share is on? is the share (FAT, HFS, HFS+, EXT3, etc..)? – prodigitalson Apr 07 '11 at 16:19
  • as far as i can see the file system on the NAS is ext4 – David Apr 07 '11 at 17:08
  • just to clarify the situation i am using mamp on my mac and on the NAS (where the db files are located) the file system is ext4 if that helps :) – David Apr 07 '11 at 17:15