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

    • Related Articles

    • Steps to Change MongoDB's Data Storage Location

      KB ID: 97 Challenge: Migrating Vembu BDR's internal MongoDB database data files from one location to another. Cause: As the size of backup data increases, the internal meta-information storage space used by MongoDB in the Vembu BDR server may also ...
    • Steps to Change the PostgreSQL Data Storage Location in BDRSuite Backup Server/BDRSuite Offsite DR Server

      KB ID: 115042 Challenge: You need to migrate the internal PostgreSQL database files of the BDRSuite Backup Server/BDRSuite Offsite DR from one location to another due to increased storage space requirements resulting from the growing backup data ...
    • Backup data migration failed from MySQL/MongoDB to PostgreSQL

      KB ID: 115093 Issue: Backup data migration encountered failure when migrating from MySQL/MongoDB to PostgreSQL. The error message "Migration Failed" may arise due to the following reasons: MySQL/MongoDB/PostgreSQL service stopped during the migration ...
    • MySQL Server - Add Data Source

      MySQL Server can be backed up using the BDRSuite Backup Server. You can simply add the source to the BDRSuite Backup Server and configure backups. Navigate to Data Sources tab and choose Add MySQL Database Server. When a MySQL Database Server is ...
    • MySQL Backup & Recovery Overview

      Overview BDRSuite's MySQL Backup solution provides reliable protection for your MySQL databases, ensuring secure backups of your critical data. With BDRSuite, you can easily restore your MySQL databases in the event of accidental deletion, data ...