Link to home
Create AccountLog in
Avatar of tradeinfo
tradeinfoFlag for United States of America

asked on

Connect to MySQL using pymysql and login-path that was setup with mysql_config_editor

When using pymysql, is there a way to connect to MySQL database using a login-path created with mysql_config_editor?
Avatar of David Favor
David Favor
Flag of United States of America image

So pymysql is just a pure Python MySQL/MariaDB client.

You connect the same way you'd connect using the native mysql client (user/pass or passing a defaults file which includes user/pass).

Keep in mind, depending on type of work you're doing, pymysql can be orders of magnitude slower than mysql.

Also pymysql will have subtle differences from the native mysql client which will be maddening to try + figure out.

Likely best to stick with the native mysql client, unless you just have time to burn tracking down weird problems.
ASKER CERTIFIED SOLUTION
Avatar of Steve Bink
Steve Bink
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of tradeinfo

ASKER

Thank you!