Steps to Change the MySQL Data Directory Location

Steps to Change the MySQL Data Directory Location

KB ID: 115037
Challenge:
Migrating BDRSuite internal database (MySQL) data files from one location to another.
Solution:
For Windows:
1. Stop the BDRSuite and MySQL Services in services.msc.
2. Open the "my.ini" file in the MySQL installation location and locate the "datadir" attribute to find the current "data" folder location.
3. Copy the MySQL "data" folder from the old location to the new location.
4. Update the "datadir" attribute with the new location in the “my.ini” file.
5. Start BDRSuite and MySQL services.
For Ubuntu:
1. Stop the BDRSuite and MySQL Services using the following commands:
    /etc/init.d/mysql stop
    /etc/init.d/vembubdr stop
2. Navigate to the "/var/lib/" location and find the "mysql" folder.
3. Copy the "mysql" folder to the new location.
4. Open the "my.cnf" file in the "/etc" location and locate the "datadir" attribute. Update it with the new location where you copied the "mysql" folder.
5. Start BDRSuite and MySQL services using the following commands:
    /etc/init.d/mysql start
    /etc/init.d/vembubdr start