Advertisements
Advertisements
Question
To establish a connection between Python and SQL databases, connect() is used. Which of the following arguments may not necessarily be given while calling connect()?
Options
host
database
user
password
MCQ
Advertisements
Solution
database
Explanation:
To create a connection between the MySQL database and the python application, the connect() function is used. The functions require 4 parameters:
- Hostname
- Username
- Password
- Database name
Among the 4 parameters, the database name is not a mandatory parameter.
So, the correct answer is the database.
shaalaa.com
SQL for Data Definition
Is there an error in this question or solution?
