filmov
tv
ADVANCED PYTHON - MYSQL CONNECTIVITY WITH PYTHON

Показать описание
Advanced Python-Easy learning method to cover all topics of advanced python.
Start by creating a connection to the database.
Use the username and password from your MySQL database:
host="localhost",
user="yourusername",
password="yourpassword"
)
print(mydb)
Connect using connect() method and pass the name of the database with which you want to initiate connection. Otherwise, Python will create a file with the given name.
After this, a cursor object is called to be capable to send commands to the SQL. Cursor is a control structure used to traverse and fetch the records of the database.
To create a table in the database, create an object and write the SQL command in it with being commented.
To execute a command, call the cursor method execute and pass the name of the sql command as a parameter in it. Save a number of commands and execute them together. After you perform all your activities, save the changes in the file by committing those changes and then lose the connection.
#kundantutorials#mysqlconnector#connect#cursor#execute
#commit#fetchall#fetchone#fetchmany
Start by creating a connection to the database.
Use the username and password from your MySQL database:
host="localhost",
user="yourusername",
password="yourpassword"
)
print(mydb)
Connect using connect() method and pass the name of the database with which you want to initiate connection. Otherwise, Python will create a file with the given name.
After this, a cursor object is called to be capable to send commands to the SQL. Cursor is a control structure used to traverse and fetch the records of the database.
To create a table in the database, create an object and write the SQL command in it with being commented.
To execute a command, call the cursor method execute and pass the name of the sql command as a parameter in it. Save a number of commands and execute them together. After you perform all your activities, save the changes in the file by committing those changes and then lose the connection.
#kundantutorials#mysqlconnector#connect#cursor#execute
#commit#fetchall#fetchone#fetchmany