MySQL Forums
Forum List  »  Newbie

change --datadir=/var/lib/mysql to /someotherslice/mysql
Posted by: carlo reyes
Date: August 03, 2006 09:11AM

Hello,

I installed mysql binary package for solaris on a Solaris 9 box. I would like to point datadir to another directory. How can I accomplish this task safely and properly? We already populated the database and it is crucial for me to keep all the data intact. /var only has 512 MB assigned to it and I should have caught this prior to populating the database. It was a bone head mistake in my part.

I suppose I can just move /var/lib/mysql to /someotherslice/mysql and create a symbolic link in /var/lib. However, I want to complete this task properly. Any advise will be appreciated.

Please see below:

# ps -ef | grep mysql
root 463 1 0 Jul 08 ? 0:00 /bin/sh /opt/mysql/mysql/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/v
mysql 491 463 0 Jul 08 ? 0:12 /opt/mysql/mysql/bin/mysqld --basedir=/opt/mysql/mysql --datadir=/var/lib/mysql
root 1541 1533 0 07:27:10 pts/1 0:00 grep mysql

Please forgive me if this is a stupid question, but I'm a newbie :)



Edited 1 time(s). Last edit at 08/03/2006 09:11AM by carlo reyes.

Options: ReplyQuote


Subject
Written By
Posted
change --datadir=/var/lib/mysql to /someotherslice/mysql
August 03, 2006 09:11AM
August 04, 2006 07:07AM
August 04, 2006 08:30AM
August 04, 2006 12:43PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.