the order of importing mysql database driver is wrong
See original GitHub issuetry:
import pymysql as mysql
except ImportError:
try:
import MySQLdb as mysql # prefer the C module.
mysql_passwd = True
except ImportError:
mysql = None
As your comment, we should prefer the C module as default because it has better performance for production but the order of importing mysql database driver is wrong.
It should be great If we can choose our database driver like sqlalchemy.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
8.4 Connector/ODBC Errors and Resolutions (FAQ)
This error occurs only with MySQL tables using the TEXT or VARCHAR data types. You can fix this error by upgrading your Connector/ODBC...
Read more >ImportError: No module named mysql.connector using Python2
I have two files. The first one has the connection and the getting of data. I import mysql.connector ...
Read more >Database Import Wizard error in MySQL DB Connector
I'm trying to import data via 'Database Import Wizard' (MySQL DB). But while trying to create the profile,I encounter this error message: "Unable...
Read more >How to Fix java.lang.ClassNotFoundException: com.mysql ...
Cause : In order to connect to MySQL database, you need JDBC driver for MySQL. A class that implements java.sql.Driver interface for MySQL....
Read more >My WebMethods startup problem with mysql database driver
The reason might be that the database tables are not completely created. Running the database component configurator we get the following error ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
So
mysql-python
(MySQLdb
) does not support Python 3, which is why it is no longer preferred. The comment needs to be updated.If you would like to explicitly use a particular driver, it is quite easy:
No disturbance – I recognize it’s a somewhat opinionated stance and the comment was incorrect, which made it worse. Hope you’re able to get things working.