| Bug #74926 | [connector_python] not well documented | ||
|---|---|---|---|
| Submitted: | 19 Nov 2014 13:42 | Modified: | 13 May 2016 16:31 |
| Reporter: | Mario Andres Gonzalez | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | Connector / Python Documentation | Severity: | S3 (Non-critical) |
| Version: | 2.x | OS: | Linux |
| Assigned to: | Paul DuBois | CPU Architecture: | Any |
| Tags: | "docuentation improvement" | ||
[19 Nov 2014 14:28]
MySQL Verification Team
Hello Mario, Thank you for the report. Agreed, [connector_python] should be explained with example. Thanks, Umesh
[13 May 2016 16:31]
Paul DuBois
Thank you for your bug report. This issue has been addressed in the documentation. The updated documentation will appear on our website shortly. Updated section: http://dev.mysql.com/doc/connector-python/en/connector-python-option-files.html

Description: If you need to pass options to the opening connection, for instance related with Mysql Fabric in a cnf file, the [connector_python] could be used. However, the only place that mention roughly about this feature is in [1] Nonetheless, I think this could be better explained with an example (please see the "Suggested fix" section of this form) How to repeat: does not applies. Suggested fix: (taken from the before last paragraph at [1]) "For the [connector_python] group, only options supported by Connector/Python are accepted. Unrecognized options cause a ValueError to be raised. For example, if you need to pass the mysql fabric credentials you can do something like: [connector_python] fabric={'host': 'myhost.com', 'username': 'myuser',.....} NOTE: the python code included must be passed in one line only, otherwise you'll start seeing obscure errors, despite the syntax is just right, like this traceback [...] File "/usr/lib/python2.7/dist-packages/mysql/connector/__init__.py", line 135, in connect new_config = read_option_files(**kwargs) File "/usr/lib/python2.7/dist-packages/mysql/connector/optionfiles.py", line 102, in read_option_files "'{0}'".format(option)) AttributeError: Unsupported argument ''username'' " [1] http://dev.mysql.com/doc/connector-python/en/connector-python-option-files.html