Operating System - HP-UX
1836456 Members
2406 Online
110101 Solutions
New Discussion

Re: Need to change iexpress/mysql home directory

 
Rgomes
Valued Contributor

Need to change iexpress/mysql home directory

Hi All,

I need to change iexpress/mysql home directory from /opt/iexpress/mysql to 'external_mount_point'. How can I do this?

TIA.
Richard
4 REPLIES 4
Arunvijai_4
Honored Contributor

Re: Need to change iexpress/mysql home directory

Don't change mysql home directory to anyother than iexpress/mysql because while building MySQL, it was specified. If you want to go for anyother than the default, you have to rebuild the source under /opt/iexpress/mysql/src

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Mark Nieuwboer
Esteemed Contributor

Re: Need to change iexpress/mysql home directory

Hi Richard,

First make a tar file of the home directory.
cd /opt/iexpress
tar xvf /tmp/mysgl.tar mysql.
umount iexpress/mysql
mount the new directory.
cd
cp /tmp/myscq.tar
tar cvf mysql.tar
then throug sam or with usermod change the home directory of the user that use /opt/iexpress/mysql.
usermod -d
after this you also have to put the new mount piont in /etc/fstab to make sure it mount with a reboot.

grtz. Mark
Rgomes
Valued Contributor

Re: Need to change iexpress/mysql home directory

Hi Mark,

Will this do? Will your steps also move existing databases? Actually I need to move mysql itself and its databases into another location safely.

Thanks.
Regards,
Richard
Steven E. Protter
Exalted Contributor

Re: Need to change iexpress/mysql home directory

Shalom Richard,

Steps:

1)Bring down the database.
2)modify my.cnf for the new location.
3)move or copy the files from the new to the old location.
4) Bring up the database.

Tips:
NFS must have full rights to the owners of the files.

Storing the database files on a Samba mount is possible, but I'd stay away from Linux Samba using regular user based authentication.

Good Luck,

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com