My development environment (Mac Lion) just got hosed after I rebooted my system today. I'm not sure what exactly happened, but it's almost as I'd reinstalled the server. My databases are gone and the users I'd set up are gone as well. There appears to be a possibly up-to-date backup of my mysql folder. /usr/local/ contains these:
lrwxr-xr-x 1 root wheel 27 19 Nov 16:18 mysql -> mysql-5.5.18-osx10.6-x86_64
drwxr-xr-x 17 root wheel 578 19 Nov 16:52 mysql-5.5.18-osx10.6-x86_64
drwxr-xr-x 11 root wheel 374 15 Aug 23:02 mysql.bak
So, if I can, how do I restore from .bak?
Also, oddly, I'm unable to shut down my mysql. I've tried shutting it down with the Mac preferences pane and with mysqladmin and it automatically starts up again immediately.
[EDIT]
The contents of the mysql.bak directory are:
drwxr-xr-x 41 root wheel 1394 4 Mar 2010 bin
drwxr-xr-x 4 root wheel 136 4 Mar 2010 docs
drwxr-xr-x 3 root wheel 102 4 Mar 2010 include
drwxr-xr-x 3 root wheel 102 4 Mar 2010 lib
drwxr-xr-x 4 root wheel 136 4 Mar 2010 libexec
drwxr-xr-x 15 root wheel 510 4 Mar 2010 mysql-test
drwxr-xr-x 5 root wheel 170 4 Mar 2010 share
drwxr-xr-x 29 root wheel 986 4 Mar 2010 sql-bench
drwx------ 17 _mysql wheel 578 19 Nov 16:20 var
This is similar (but not identical) to the active mysql directory:
-rw-r--r-- 1 root wheel 17987 14 Nov 08:47 COPYING
-rw-r--r-- 1 root wheel 7370 14 Nov 08:47 INSTALL-BINARY
-rw-r--r-- 1 root wheel 2552 14 Nov 08:47 README
drwxr-xr-x 46 root wheel 1564 14 Nov 08:54 bin
drwxr-xr-x 39 _mysql wheel 1326 9 Dec 01:39 data
drwxr-xr-x 6 root wheel 204 14 Nov 08:54 docs
drwxr-xr-x 37 root wheel 1258 14 Nov 08:54 include
drwxr-xr-x 12 root wheel 408 19 Nov 16:19 lib
drwxr-xr-x 4 root wheel 136 14 Nov 08:54 man
drwxr-xr-x 19 root wheel 646 19 Nov 16:19 mysql-test
drwxr-xr-x 3 root wheel 102 14 Nov 08:54 scripts
drwxr-xr-x 32 root wheel 1088 14 Nov 08:54 share
drwxr-xr-x 28 root wheel 952 14 Nov 08:54 sql-bench
drwxr-xr-x 16 root wheel 544 14 Nov 08:54 support-files
drwxrwxrwt 4 root wheel 136 8 Dec 23:18 var
And the version I'm using is mysql-5.5.18-osx10.6-x86_64.
mysql.bakis a directory -- What are its contents? – voretaq7♦ Dec 8 '11 at 16:46