I am using Python 3.6 and mysql-connector 2.1.6 on macOS High Sierra. Following the instructions in the example on this documentation page 'https://dev.mysql.com/doc/connector-python/en/connector-python-api-mysqlconnectionpool-constructor.html', when I attempt to create a connection pool as follows:
cnxpool = mysql.connector.pooling.MySQLConnectionPool(pool_name = "mypool",pool_size = 3,**dbconfig)
I get the following error:
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 2869, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "<ipython-input-4-b07112a83246>", line 1, in <module>
    cnxpool = mysql.connector.pooling.MySQLConnectionPool(pool_name = "mypool",pool_size = 3,\**dbconfig)
AttributeError: module 'mysql.connector' has no attribute 'pooling'**
I have provided a valid **dbconfig argument.
May someone please help explain why it's not working?
import mysql.connector.pooling, or just part of that?import mysql.connectorimport mysql.connector.poolingit works. Thanks @Alex Hall