How can i switch MySQL schemas at connection level (using aws lambda + python)?

44 views
Skip to first unread message

Rahul B

unread,
Jan 1, 2019, 11:37:57 PM1/1/19
to PyMySQL Users
I have a MySQL database with couple of schemas (say dev schema and test schema). I am using AWS MySQL service. I have a small application that is working out well with the AWS stack and MySQL.

I want to use the same codebase (deployed separately) to work with the same MySQL database (but different schema) without having to re-write all my SQLs to add the schema name in there. Is there a way in PyMySQL to specify default/preferred schema at the time of database connection creation?

I am trying to stay within the free tier limits of AWS so not looking to create another database in there.

Thanks
Rahul
Reply all
Reply to author
Forward
0 new messages