[
https://issues.apache.org/jira/browse/CLOUDSTACK-8818?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15261988#comment-15261988
]
ASF GitHub Bot commented on CLOUDSTACK-8818:
--------------------------------------------
Github user rhtyd commented on the pull request:
https://github.com/apache/cloudstack/pull/1054#issuecomment-215392929
@wido that is true, so will simply fixing the imports and usage work?
I found using `git grep MySQLdb`:
```
client/bindir/cloud-update-xenserver-licenses.in:import MySQLdb
client/bindir/cloud-update-xenserver-licenses.in: conn =
MySQLdb.connect(host=host,user=username,passwd=password)
python/lib/cloudutils/db.py:import MySQLdb
python/lib/cloudutils/db.py: txn =
MySQLdb.Connect(host=self.host, user=self.username,
python/lib/cloudutils/db.py: txn =
MySQLdb.Connect(host=self.host, user=self.username,
python/lib/cloudutils/db.py: db =
MySQLdb.Connect(host=self.host, user=self.username,
python/lib/cloudutils/db.py: db =
MySQLdb.Connect(host=self.host, user=self.username,
setup/bindir/cloud-migrate-databases.in:import MySQLdb
setup/bindir/cloud-migrate-databases.in: self.conn =
MySQLdb.connect(host=self.host,
```
> Python scripts should depend on mysql.connector instead of MySQLdb
> ------------------------------------------------------------------
>
> Key: CLOUDSTACK-8818
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8818
> Project: CloudStack
> Issue Type: Improvement
> Security Level: Public(Anyone can view this level - this is the
> default.)
> Reporter: Wido den Hollander
> Labels: mysql, python, python3
>
> Our current Python scripts depend on MySQLdb for MySQL connections.
> The best way to go is the native mysql.connector which implements the MySQL
> protocol in native Python instead of depending on external libraries.
> It would be best if we drop MySQLdb and use mysql.connector since that also
> supports Python 3.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)