Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

To use mysqldump, run the mysqldump executable, passing the root username, password, and output file:

  1. Run the following command to navigate to the executable directory:

    No Format
    cd <controller_home>/db/bin 
  2. Use the following command to export the database from MySQL:

    No Format
    ./mysqldump -u root --databases controller mds_account mds_alerting mds_configuration mds_dashboard mds_entitygraph mds_entitysearch mds_federation mds_infra_core mds_infra_core mds_infra_server mds_license mds_metadata mds_metering mds_metric_metadata mds_rbac mds_topology --single-transaction --compress --order-by-primary -p"<password>" > backup.sql
  3. In order to import the resulting file into Aurora, you need to replace the following line: 

No Format
/*!50013 DEFINER=`controller`@`localhost` SQL SECURITY DEFINER */

With:

 

No Format
/*!50013 DEFINER=`controller`@`%` SQL SECURITY DEFINER */

Step 3: Use mysqldump to export stored procedures from the AppDynamics database

  1. Run the following command to export the stored procedures from the AppDynamics database.

    Code Block
    ./mysqldump --user=root -p --protocol=TCP --host=127.0.0.1 --port=<controller MySQL port> --no-create-db --skip-add-drop-table --no-create-info --skip-disable-keys mysql proc --result-file=/staging/path/for/mysql.proc.sql

    This command, through the --result-file option, dumps the stored procedures to /staging/path/for/mysql.proc.sql.

  2. Drop all non-mysql and non-sys stored procedures.

Step 4: Use

...

mysql to Import to Aurora

  1. Run the following command to navigate to the executable directory:

    No Format
    cd <controller_home>/db/bin 
  2. Connect to the new Aurora instance:

    No Format
    ./mysql -u root -p"<password>" -h <hostname>.<aws-region>.rds.amazonaws.com -P 3388 --protocol=TCP
  3. Then create the Controller user, and grant it permissions:

    No Format
    CREATE USER 'controller'@'%' IDENTIFIED BY 'controller';
    GRANT USAGE ON *.* TO 'controller'@'%';
    GRANT ALL PRIVILEGES ON `controller`.* TO 'controller'@'%';
    GRANT ALL PRIVILEGES ON `mds_account`.* TO 'controller'@'%';
    GRANT ALL PRIVILEGES ON `mds_configuration`.* TO 'controller'@'%';
    GRANT ALL PRIVILEGES ON `mds_license`.* TO 'controller'@'%';
    GRANT ALL PRIVILEGES ON `mds_metadata`.* TO 'controller'@'%';
    GRANT ALL PRIVILEGES ON `mds_metering`.* TO 'controller'@'%';
    GRANT ALL PRIVILEGES ON `mds_rbac`.* TO 'controller'@'%';
    GRANT ALL PRIVILEGES ON `mds_topology`.* TO 'controller'@'%';
    GRANT ALL PRIVILEGES ON `mds_metric_metadata`.* TO 'controller'@'%';
    GRANT ALL PRIVILEGES ON `mds_entitygraph`.* TO 'controller'@'%';
    GRANT ALL PRIVILEGES ON `mds_infra_core`.* TO 'controller'@'%';
    GRANT ALL PRIVILEGES ON `mds_infra_server`.* TO 'controller'@'%';
    GRANT ALL PRIVILEGES ON `mds_alerting`.* TO 'controller'@'%';
    GRANT ALL PRIVILEGES ON `mds_entitysearch`.* TO 'controller'@'%';
    GRANT ALL PRIVILEGES ON `mds_dashboard`.* TO 'controller'@'%';
    GRANT ALL PRIVILEGES ON `mds_federation`.* TO 'controller'@'%';
    GRANT ALL PRIVILEGES ON `mds_auth`.* TO 'controller'@'%';
    FLUSH PRIVILEGES;
    Info
    titleNote

    The Aurora database is protected by security groups to prevent access from unauthorized sources.

  4. Import the database backup:

    No Format
    ./mysql -u controller --port=3388 --host=<hostname>.<aws-region>.rds.amazonaws.com -p"controller" --protocol=TCP < backup.sql
  5. Import the stored procedures:

...