I have a WAMP server running on Windows 7 and I want to move the mysql data files to a network share (A NAS device).

I stopped the WAMP server, created a drive letter mapping to a share on the NAS, copied the files from the old location to a folder under the new share

and in my.ini changed
datadir=c:/wamp/bin/mysql/mysql5.1.36/data
to:
datadir=s:/wamp_files (s: is mapped to the \NAS\SHARE and an wamp_files is a folder)

and restarted the WAMP server.

It now says (in mysql.log):

wampmysqld: File '.\mysql-bin.index' not found (Errcode: 13) 111116 12:27:24 [ERROR] Aborting

111116 12:27:24 [Note] wampmysqld: Shutdown complete

and the mysql service refuses to start.

Any ideas anyone?

(The NAS is a netgear readyNAS device and the share is set for public access)

link|improve this question

80% accept rate
feedback

1 Answer

up vote 2 down vote accepted

Drive mappings that you create under your login, i.e. through Explorer, aren't available to a service. There's a stackoverflow question that suggests some work arounds and one potential solution (the answer by ForcePush).

The more robust option would be to see if you can change the datadir to point to a network share, rather than a mapped network drive.

link|improve this answer
right on the money :) I actually started with it pointing to a network share but probably had some slashes wrong and it did not work. switched now back to network share and its just fine. Thanks. – epeleg Nov 16 '11 at 13:19
@epeleg, glad I could help =) – Rob Nov 16 '11 at 13:33
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.