On 2009-04-27 , at 19:54 , Scott Haneda wrote:

If this is the case, shut down mysql server. You should find your old data at
/usr/local/mysql/data

You should see your new mysql data from macports at:
/opt/local/var/db/mysql5


That accomplishes getting the data moved to where the mysql5 installation wants it to be by default, but it doesn't accomplish having your data where it is independent of whose distribution of mysql5 that you use - Apple, MySQL, ports

Lots of "applications" let you specify how to get to the mysql data via the socket interface - you may just want to change the config file for the app...

There's a very simple way to keep your data in one place - use /etc/ my.cnf to define things.

My example uses the "default" location of data based on the OS X Server definitions - you could just as easily use "/var/lib/mysql" like Centos, or whatever.

in the [mysqld] section add

basedir = /opt/local
datadir = /var/mysql

in the [client] section

socket = /var/mysql/mysql.sock

I added the following set of definitions to "make sure" that things got it straight

# face - 20070227
[mysqld_safe]
basedir = /opt/local
datadir = /var/mysql

[mysql.server]
basedir = /opt/local
datadir = /var/mysql

[mysql_config]
socket = /var/mysql/mysql.sock

8)
----------------------------------
Chris Janton  - face at CentosPrime dot COM
Netminder for Opus1.COM


_______________________________________________
macports-users mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macports-users

Reply via email to