Which of the following is used to install MYSQL?
Which of the following is used to install MYSQL?
Solution
✅ Correct Option: 1
pip install pymysql uses pip, Python's package installer, to install PyMySQL. This library lets Python connect to a MySQL database.
Options 2 and 4: pd.read_sql() and to_sql() are pandas functions that read from or write to a database. They do not install anything.
Option 3: sql is not the MySQL driver package, so installing it does not give Python a MySQL connection.
PyMySQL only connects Python to MySQL. The MySQL server itself is installed separately.
Related questions:
2025: 14 May Shift 1
2025: 13 May Shift 2
2026: 19 May Shift 1