When connecting to the MySQL database, often we have to create a connection, create a cursor, execute the queries and then close the cursor and connection. This process can be automated and simplified ...