• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

How to use mysqlsh to execute addInstance in silent mode

by admin

Question: How to use mysqlsh to execute addInstance in silent mode (from a script) and avoid answering such a question?

cl.addInstance('[USER]@[HOST]:[PORT]')
Please pick an option out of [C]lone/[I]ncremental recover/[A]bort (default Clone):

Adding an instance to InnoDB Cluster requires the specification of what kind of recovery is desired. This can be of two types (incremental or clone), one can be better than another depending on the distance of the data between the candidate instance and the cluster.

As an example, if the instance to be added is empty, the option would be clone. In such a case the command can be executed in silent mode as follows.

cl.addInstance('[USER]@[HOST]:[PORT]', {recoveryMethod: 'clone'})

Filed Under: mysql

Some more articles you might also be interested in …

  1. Multi-Versioning in MySQL Database
  2. How to gather information on the MySQL 8 Roles and Privileges assigned to a user without using SHOW GRANTS
  3. “Access denied for user ‘username’@’hostname’ (using password: YES)” – Error while connecting MySQL with PHP
  4. MySQL Error “Too many connections” and how to resolve it
  5. What is the MySQL Enterprise Monitor?
  6. MySQL Cluster Point-In-Time Recovery (PITR)
  7. What is the meaning of the TRX_TABLES_LOCKED column in the information_schema.INNODB_TRX MySQL table
  8. Understanding the Different Configuration files used for MySQL Server
  9. How to Change the Default Character Set and Collation for a Database in MySQL
  10. Troubleshooting MySQL Query hung – “Waiting for Table Flush”

You May Also Like

Primary Sidebar

Recent Posts

  • powertop Command Examples in Linux
  • powertop: command not found
  • powerstat: command not found
  • powerstat Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright