Control Web Panel

WebPanel => CentOS 7 Problems => Topic started by: gilbert.jr on March 19, 2017, 12:49:06 PM

Title: can't move mysql datadir
Post by: gilbert.jr on March 19, 2017, 12:49:06 PM
somebody can help me ?
how to move data dir mysql on CWP Centos7 ?
i was try follow tutorial on CWP wiki about "How to change MySQL Location" but fail always return
Code: [Select]
Restarting mysqld (via systemctl):  Job for mariadb.service failed because the control process exited with error code. See "systemctl status mariadb.service" and "journalctl -xe" for details.
please somebody help.
Title: Re: can't move mysql datadir
Post by: tackleza on April 04, 2017, 01:58:51 PM
Same as me! :'(

I spend more than 5 hours, do random things to make this work but it didn't
I want to make this work on Centos 7. For now I have to fallback to Centos 6 because of this

If anyone found solution for this please reply in this topic, thanks
Title: Re: can't move mysql datadir
Post by: Administrator on April 05, 2017, 10:27:27 AM
this works fine did that multiple times, make sure mysql is down when you do this things and check the logs if you have some errors!
Title: Re: can't move mysql datadir
Post by: locvfx on May 01, 2017, 04:49:01 PM
service mysqld stop
cd /var/lib
mv mysql YOUR_NEW_LOCATION_PATH
ln -s YOUR_NEW_LOCATION_PATH mysql
chown -R mysql:mysql YOUR_NEW_LOCATION_PATH
service mysqld start
Title: Re: can't move mysql datadir
Post by: luciferxe on November 07, 2017, 06:05:12 PM
I have tried but I get errors saying to check my password in the config files.
The password is the same one it generated on install.
This is on a fresh install as well.
Is there something I am missing?
service mysqld stop
cd /var/lib
mv mysql YOUR_NEW_LOCATION_PATH
ln -s YOUR_NEW_LOCATION_PATH mysql
chown -R mysql:mysql YOUR_NEW_LOCATION_PATH
service mysqld start
is