Not the answer you need?
Register and ask your own question!

MySql - Change data folder

ElectivoElectivo EntrantCurrent User Role Beginner

I just installed Percona Server 5.7 and want to change the data folder.

I proceeded as follows:

1. I stopped the service - service mysqld stop
2. I edited the /etc/percon-server.conf.d/mysqld.cnf file and changed the new path (datadir = /opt1/mysql-data/mysql)
3. I copied the entire contents of /var/lib/mysql to /opt1/mysql-data/mysql preserving the attributes
4. I tried to restart the database and received the following message:

"Job for mysqld.service failed because the control process exited with error code. See" systemctl status mysqld.service "and" journalctl -xe "for details."

If I return to the original settings everything returns to normal.

Any suggestion?



Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.