> Running OS / X, A while ago, attempted to compile MySql5. Didn't take
> as far as I could tell, mysql -v still said 4.
>
> Today, near as I can tell after doing a fink-update, my mysql database
> is gone.
>
> Mysql -v shows:
> Your MySQL connection id is 79 to server version: 5.0.18-standard
>
> Unfortunately, I don't know enough SQL to be even dangerous. It's
> mainly for my mambo server.
>
> Is there a way to find where my old data was and put it back in my
> 5.0 database? I don't even know what files to look for.
In Terminal try 'which database_name' and/or 'find database_name' and
see what turns up. Since you created the database(s), I am presuming
you know the name(s). I'm just learning MySQL myself, so I can't say
anything about what to do from inside it.
> Hope this makes sense. It's late and I've spent the last few hours
> trying to figure this out.
I think it's an issue of the Fink filesystem. Fink creates it's own
filesystem within the OS X filesystem- just about everything installed
under Fink is placed in /sw and Fink modifies your $PATH to look for stuff
there. My hunch is that your new version of mysql is looking for your
databases perhaps in /sw/usr/local/ but your databases are probably in
/usr/local/mysql instead.
Are you using Fink for other packages, or just to install MySQL? If
the latter, I'd recommend dumping Fink and removing the /sw parts of
your $PATH. Fink is useful but also creates a number ofproblems by
seting up its own filesystem in /sw. There is a native OS X version
of 5.0.18 available at www.mysql.com that will install into
/usr/local. Make sure that you add /usr/local/mysql/bin to your $PATH
so that your shell (bash by default in 10.3.x or 10.4.x) can find the
MySQL binary. The OS X release from MySQL will also give you a
prefpane for starting and stopping MySQL. There's also a MySQL
Administrator application that seems pretty slick.
If you want to keep Fink, then at least try adding
/usr/local/mysql/bin and /usr/local/mysql to your $PATH and see if
that fixes the problem.
Hope this helps!
> Adding the two directories to my path did the trick.
> mysql -v now says 4.1.10, but I have my data back. :)
Excellent! If you feel the need to upgrade to 5.0.18, consider the
.pkg binary from www.mysql.com (and read the pages on ugrading, of
course). And backing up that databse might not be a bad idea... ;-)