title: Access database member of PoolConfig of mysql Pool ojbect
body: <p>I want to get a database from a pool object and assign a different database name to it.</p>
  
  <p>I have been using this function to get a pool. But this function returns a new pool with different config every time.</p>
  
  <pre><code>function getPool(database_name){
      if(database_name)
          config.database = database_name;
      var pool = require('mysql').createPool(config);
      console.log(pool);
      return pool;
  }
  </code></pre>
  
  <p>I want something like this. so that it returns the same pool with a different configuration.</p>
  
  <pre><code>var pool = require('mysql').createPool(config);
  
  function getPool(database_name){
      if(database_name)
          pool.config.PoolConfig.database = database_name;
      console.log(pool);
      return pool;
  }
  </code></pre>
  
  <p>In printing out the pool object and try to access the database parameter of the object to modify it. but it didn't work out. How can I access the database element of this object?
  Here is the object</p>
  
  <pre><code>Pool {
    _events: [Object: null prototype] {},
    _eventsCount: 0,
    _maxListeners: undefined,
    config:
     PoolConfig {
       acquireTimeout: 10000,
       connectionConfig:
        ConnectionConfig {
          host: 'localhost',
          port: 3306,
          localAddress: undefined,
          socketPath: undefined,
          user: 'root',
          password: 'password',
          database: 'mydatabasename',
          connectTimeout: 10000,
          insecureAuth: false,
          supportBigNumbers: false,
          bigNumberStrings: false,
          dateStrings: false,
          debug: undefined,
          trace: true,
          stringifyObjects: false,
          timezone: 'local',
          flags: '',
          queryFormat: undefined,
          pool: [Circular],
          ssl: false,
          multipleStatements: false,
          typeCast: true,
          maxPacketSize: 0,
          charsetNumber: 33,
          clientFlags: 455631 },
       waitForConnections: true,
       connectionLimit: 10,
       queueLimit: 0,
       database: 'eventx' },
    _acquiringConnections: [],
    _allConnections: [],
    _freeConnections: [],
    _connectionQueue: [],
    _closed: false }
  pool connection : [object Object]
  </code></pre>