mysql database connect terminal code example
Example 1: how to connect to mysql database in python
import mysql.connector
cnx = mysql.connector.connect(user='scott', password='password',
host='127.0.0.1',
database='employees')
cnx.close()
Example 2: login to database mysql terminal
use DBNAME;