Home / Repstance User Guide / 6. DATABASE CONFIGURATION COMMANDS / 7.2.1 Remove Repstance Database Objects in MS SQL Server / 7.2.4 Remove Repstance Database Objects in MySQL and Aurora MySQL Databases

7.2.4 Remove Repstance Database Objects in MySQL and Aurora MySQL Databases

Note – In order to use the “remove” database command the database user must have sufficient privileges.

REST API:

  • Endpoint: https://repstance_url/configure/database
  • Method: POST
  • Header:
    • Content-Type: application/json
    • X-Token: token
  • Body:
    {    
      "command":"remove",
      "parameters":[
          ["database","target"],
          ["dbtype","mysql"],
          ["server","host_name"],
          ["port","port_number"],
          ["dbname","database_name"],
          ["user","db_user_name"],
          ["password","db_user_password"]
       ]
    }

Server response:

  • HTTP Status – status of the command, possible codes are:
    • 200 – if no error occurs
    • 422 – if error occurs
  • Body:
    {
      "Status":"{Completed|Failed}",
      "Message":"The command execution details"
    }

CLI Syntax:

repcli remove database=target dbtype=mysql \
server=databaseHost port=databasePort \
user=username password=password \
dbname=databaseName

The input parameters are:

  • database – Database role, the only possible value is target – to remove Apply Process Objects
  • dbtype – Type of RDBMS, the possible value is mysql
  • server – Host name or IP address of the database server
  • port – Database port
  • dbname – Database name
  • user – Database User name
  • password – Database User password