title: MySQL: Cannot set MySQL server for InnoDB Cluster with dba.configureLocalInstance()
body: <p>I am trying to setup a Production Deployment of InnoDB Cluster (<a href="https://dev.mysql.com/doc/refman/8.0/en/mysql-innodb-cluster-production-deployment.html" rel="nofollow noreferrer">https://dev.mysql.com/doc/refman/8.0/en/mysql-innodb-cluster-production-deployment.html</a>) by following the steps outlined in the documentation. 
  I am using MySQL 5.7.25</p>
  
  <p>My MySQL server starts successfully and I run (from the MySQL Shell)</p>
  
  <pre><code>dba.checkInstanceConfiguration('root@localhost:3306')
  </code></pre>
  
  <p>which prints </p>
  
  <pre><code>    Validating local MySQL instance listening at port 3306 for use in an InnoDB cluster...
  
  This instance reports its own address as ip-10-0-3-184.ap-south-1.compute.internal
  Clients and other cluster members will communicate with it through this address by default. If this is not correct, the report_host MySQL system variable should be changed.
  
  Checking whether existing tables comply with Group Replication requirements...
  No incompatible tables detected
  
  Checking instance configuration...
  
  Some configuration options need to be fixed:
  +----------------------------------+---------------+----------------+--------------------------------------------------+
  | Variable                         | Current Value | Required Value | Note                                             |
  +----------------------------------+---------------+----------------+--------------------------------------------------+
  | enforce_gtid_consistency         | OFF           | ON             | Update the config file and restart the server    |
  | gtid_mode                        | OFF           | ON             | Update the config file and restart the server    |
  | log_bin                          | &lt;not set&gt;     | &lt;no value&gt;     | Update the config file                           |
  | log_bin                          | OFF           | ON             | Update read-only variable and restart the server |
  | log_slave_updates                | OFF           | ON             | Update the config file and restart the server    |
  | master_info_repository           | FILE          | TABLE          | Update the config file and restart the server    |
  | relay_log_info_repository        | FILE          | TABLE          | Update the config file and restart the server    |
  | server_id                        | 0             | &lt;unique ID&gt;    | Update the config file and restart the server    |
  | transaction_write_set_extraction | OFF           | XXHASH64       | Update the config file and restart the server    |
  +----------------------------------+---------------+----------------+--------------------------------------------------+
  
  Some variables need to be changed, but cannot be done dynamically on the server: an option file is required.
  Please use the dba.configureInstance() command to repair these issues.
  
  {
      "config_errors": [
          {
              "action": "config_update+restart", 
              "current": "OFF", 
              "option": "enforce_gtid_consistency", 
              "required": "ON"
          }, 
          {
              "action": "config_update+restart", 
              "current": "OFF", 
              "option": "gtid_mode", 
              "required": "ON"
          }, 
          {
              "action": "config_update", 
              "current": "&lt;not set&gt;", 
              "option": "log_bin", 
              "required": "&lt;no value&gt;"
          }, 
          {
              "action": "restart", 
              "current": "OFF", 
              "option": "log_bin", 
              "required": "ON"
          }, 
          {
              "action": "config_update+restart", 
              "current": "OFF", 
              "option": "log_slave_updates", 
              "required": "ON"
          }, 
          {
              "action": "config_update+restart", 
              "current": "FILE", 
              "option": "master_info_repository", 
              "required": "TABLE"
          }, 
          {
              "action": "config_update+restart", 
              "current": "FILE", 
              "option": "relay_log_info_repository", 
              "required": "TABLE"
          }, 
          {
              "action": "config_update+restart", 
              "current": "0", 
              "option": "server_id", 
              "required": "&lt;unique ID&gt;"
          }, 
          {
              "action": "config_update+restart", 
              "current": "OFF", 
              "option": "transaction_write_set_extraction", 
              "required": "XXHASH64"
          }
      ], 
      "status": "error"
  </code></pre>
  
  <p>(So far so good)</p>
  
  <p>After this I try running <code>dba.configureLocalInstance()</code> but I get the following error message:</p>
  
  <pre><code>Dba.configureLocalInstance: Dba.configureLocalInstance: An open session is required to perform this operation. (RuntimeError)
  </code></pre>
  
  <p>I am not sure what this means but to try to get around it I run <code>dba.configureLocalInstance('root@localhost:3306')</code> which seems to work:</p>
  
  <pre><code>Configuring local MySQL instance listening at port 3306 for use in an InnoDB cluster...
  
  This instance reports its own address as ip-10-0-3-184.ap-south-1.compute.internal
  Clients and other cluster members will communicate with it through this address by default. If this is not correct, the report_host MySQL system variable should be changed.
  
  WARNING: User 'root' can only connect from localhost.
  If you need to manage this instance while connected from other hosts, new account(s) with the proper source address specification must be created.
  
  1) Create remotely usable account for 'root' with same grants and password
  2) Create a new admin account for InnoDB cluster with minimal required grants
  3) Ignore and continue
  4) Cancel
  
  Please select an option [1]: 3
  
  Some configuration options need to be fixed:
  +----------------------------------+---------------+----------------+--------------------------------------------------+
  | Variable                         | Current Value | Required Value | Note                                             |
  +----------------------------------+---------------+----------------+--------------------------------------------------+
  | enforce_gtid_consistency         | OFF           | ON             | Update the config file and restart the server    |
  | gtid_mode                        | OFF           | ON             | Update the config file and restart the server    |
  | log_bin                          | &lt;not set&gt;     | &lt;no value&gt;     | Update the config file                           |
  | log_bin                          | OFF           | ON             | Update read-only variable and restart the server |
  | log_slave_updates                | OFF           | ON             | Update the config file and restart the server    |
  | master_info_repository           | FILE          | TABLE          | Update the config file and restart the server    |
  | relay_log_info_repository        | FILE          | TABLE          | Update the config file and restart the server    |
  | server_id                        | 0             | &lt;unique ID&gt;    | Update the config file and restart the server    |
  | transaction_write_set_extraction | OFF           | XXHASH64       | Update the config file and restart the server    |
  +----------------------------------+---------------+----------------+--------------------------------------------------+
  
  Some variables need to be changed, but cannot be done dynamically on the server: an option file is required.
  
  Detecting the configuration file...
  Found configuration file at standard location: /etc/my.cnf
  Do you want to modify this file? [y/N]: y
  Do you want to perform the required configuration changes? [y/n]: y
  Configuring instance...
  The instance 'localhost:3306' was configured for InnoDB cluster usage.
  MySQL server needs to be restarted for configuration changes to take effect.
  </code></pre>
  
  <p>But then after I restart MySQL server, I get the exact same output for <code>dba.checkInstanceConfiguration('root@localhost:3306')</code>...</p>
  
  <p>I have also noticed that <code>/etc/my.cnf</code> has not been modified from it's default from the initial installation. In case it was a permissions issues I changed the owner of <code>/etc/my.cnf</code> to be owned my the user "mysql" but the result is the same...</p>
  
  <p>Anybody that can shed some light onto it? Any help is appreciated.</p>