3.2 Steps to Install MYSQL driver and connecting MySQL server

 v  Steps to Install MYSQL driver and connecting MySQL server: -

Ø Python can interact with MySQL using connectors (libraries).

Ø The most commonly used library is: mysql-connector-python.

Ø To install MySQL driver, type this following command in command prompt.

 

Py -m pip install mysql-connector-python

 

Ø To test if the installation was successful, use following command in python IDLE.

 


 Ø To connect with MySQL server, we can use connect( ) method.

Ø The sample format code in python is

      syntax: -


example: -

 

Output: -

 

Ø  The default tables in MySQL are:

 


 

Popular posts from this blog

operators in c programming

Variables in c

Cloud Storage and Local Storage: Applications in Business