MySQL Forums
Forum List  »  Install & Repo

Re: switch more datadir
Posted by: biagio rea
Date: April 13, 2016 01:52AM

thank you Peter Brawley for Answer

to duplicate the folder I used the cp command with the -a option

I will list the steps, it is possible that there is something wrong or something is missing

first stop the service
sudo service mysql stop

then duplicate the folder
sudo cp -a -R /var/lib/mysql/ /var/lib/mysql2/

rename the /var/lib/mysql/ so that it can not be damaged
sudo mv /var/lib/mysql/ /var/lib/mysql_orig/

set the new datadir
sudo gedit /etc/mysql/my.cnf
datadir = /var/lib/mysql2

restart
sudo service mysql start
start: Job failed to start !!!!!

Options: ReplyQuote


Subject
Written By
Posted
April 10, 2016 09:56AM
April 10, 2016 10:44AM
April 10, 2016 05:30PM
April 13, 2016 08:51AM
Re: switch more datadir
April 13, 2016 01:52AM


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.