MySQL Flashcards
What connection method is used for a local MySQL server?
Standard TCP/IP.
What is the default host name for a local MySQL connection?
localhost
What is the default port number for MySQL?
3306.
What SQL command is used to create a database?
CREATE DATABASE.
How should SQL statements be concluded?
With a semicolon.
What icon is used to execute a command in MySQL Workbench?
The lightning bolt icon.
What happens when you refresh the Schemas tab after creating a database?
The newly created database will appear.
How do you select set a database as the default schema?
- Right-click on the database
- Select ‘set as default schema’.
What command is used to switch to a specific database?
USE [database_name];
What command is used to drop a database?
DROP DATABASE [database_name];
What does the ‘sys’ database represent in MySQL?
The internal database used by MySQL.
What SQL command is used to set a database to read-only mode?
ALTER DATABASE [database_name] READ ONLY = 1;
What happens when a database is set to read-only mode?
Modifications aren’t allowed, but data can still be accessed.
What SQL command is used to remove the read-only status of a database?
ALTER DATABASE [database_name] READ ONLY = 0;
What is the SQL command to create a table?
CREATE TABLE [table_name];
What are the components of a table in a relational database?
Rows and columns.
A folder acts as a ______.
container
Tables are like the files contained within that folder.
How is MySQL designed to be flexible and user-friendly?
- In MySQL, keywords like
SELECT
,FROM
,WHERE
, and others are not case-sensitive. - This means you can write them in uppercase, lowercase, or a mix of both, and MySQL will interpret them the same way.
What should you do if you want to recreate a database after dropping it?
CREATE DATABASE [database_name];
What protocols can clients use to connect to MySQL Server?
Clients can connect using:
- TCP/IP sockets
- named pipes (on Windows)
- shared memory (on Windows)
- Unix domain socket files
Named pipes and shared memory connections require specific server startup configurations.
Which programming languages are supported for writing MySQL client programs?
C, C++, Eiffel, Java, Perl, PHP, Python, Ruby, Tcl
Client libraries are available for various languages, including C and C++.
What is the purpose of the Connector/ODBC interface?
(ODBC) is a protocol that you can use to connect a Microsoft Access database to an external data source such as M̶i̶c̶r̶o̶s̶o̶f̶t̶ SQL Server
Open Database Connectivity
What does Connector/J support?
- Connector/J is a Java driver that supports connections to various database engines including MySQL.
- It implements the Java Database Connectivity (JDBC) API and extensions to the API
Can be run on both Windows and Unix.
What is the function of MySQL Connector/NET?
It enables developers to create .NET
applications requiring secure, high-performance data connectivity with MySQL implementation.
It is a fully managed ADO.NET driver written in 100% pure C#.