Multiple MySQL Hosts in Connection String

49 views
Skip to first unread message

Grady

unread,
May 16, 2016, 1:42:08 PM5/16/16
to PyMySQL Users
Hello:

Is it possible to specify multiple MySQL hosts in the connection string and if so, what would that look like? I have a failover DB I'd like to connect to in the event that connection to the primary DB times out.

Thanks!

Naoki INADA

unread,
May 17, 2016, 12:47:44 AM5/17/16
to PyMySQL Users
PyMySQL is low level connector.
It doesn't have something like connection pool which manage group of connections.

It should be separated library.  For example, SQLAlchemy's `engine` has `creator` argument.
You can do anything you want to at there.
Reply all
Reply to author
Forward
0 new messages