Computer Science
In order to open a connection with MySQL database from within Python using mysql.connector package, …………… function is used.
- open()
- database()
- connect()
- connectdb()
Python MySQL
1 Like
Answer
connect()
Reason — The connect() function of mysql.connector is used for establishing connection to a MYSQL database.
Answered By
2 Likes
Related Questions
Which function/method do you use for executing an SQL query ?
Which method do you use to fetch records from the result set ?
A database …………… controls the connection to an actual database, established from within a Python program.
- database object
- connection object
- fetch object
- query object
The set of records retrieved after executing an SQL query over an established database connection is called …………… .
- table
- sqlresult
- result
- resultset