Author Topic: can't move mysql datadir  (Read 361 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
can't move mysql datadir
« 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.

Offline
*
Re: can't move mysql datadir
« Reply #1 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

Offline
*
Re: can't move mysql datadir
« Reply #2 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!
AntiDDoS Protection (web + mail)
http://centos-webpanel.com/website-ddos-protection-proxy

Join our Development Team and get paid !
http://centos-webpanel.com/develope-modules-for-cwp


Services Monitoring & RBL Monitoring
http://centos-webpanel.com/services-monitor


Do you need Fast and FREE Support included for your CWP linux server?
http://centos-webpanel.com/noc-partner-list
Installation Instructions
http://centos-webpanel.com/installation-instructions
Get Fast Support Here
http://centos-webpanel.com/support-services

Offline
**
Re: can't move mysql datadir
« Reply #3 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