I hope this is the right place--i looked over the MySQL docs but they talk 
about a different startup practice than what FreeBSD uses.

I have a new install of MySQL 5.1 on a FreeBSD 6.2 system. I want to have my
MySQL data directory in a place other than /var/db/mysql. I thought i do this by
copying the appropriate my.cnf into /etc/my.conf and adding a line like 
"datadir =
/usr/local/mysql/var/" and making it readable to mysql user. But this doesnt 
 when i restart MySQL its still using /var/db/mysql.

So i looked at the mysql-server startup script in /usr/local/etc/rc.d and added 
rc.conf "mysql_dbdir="/usr/local/mysql/var"". (I DON'T want to do it this way,
because i really want my MySQL related configuration things in my MySQL
configuration file, not split between there and my FreeBSD startup file. What if
i need to start mysql in some other way? But for now im just trying to see what
i can get to work.) This seemed to change something--mysqld had been running
when i made this change and when I ran "mysql-server stop" it couldnt stop, 
because it was looking in /usr/local/mysql/var/foo.pid--i think this means it 
register the change to the new directory. But i couldnt then start it, because 
I run "mysql-server start" i get a "Can't connect to local MySQL server through 
socket '/tmp/mysql.sock'" error.

What's the right way to do this? Again id really prefer to do this all through 
my.cnf file, but this seems not to be getting read, at least for this reason.

Thank you.


Food fight? Enjoy some healthy debate
in the Yahoo! Answers Food & Drink Q&A.
freebsd-questions@freebsd.org mailing list
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to