Client/Server Concepts

23 important questions on Client/Server Concepts

What is the default socket file location?

/tmp/mysql.sock

What are the 2 possible actions to connect to a MySQL server on localhost but not via a socket?

1. Use 127.0.0.1 as the hostname
2. Use --protocol=tcp

What is the default mysql user name on windows and what on linux?

On windows 'ODBC' and on unix the logged in user
  • Higher grades + faster learning
  • Never study anything twice
  • 100% sure, 100% understanding
Discover Study Smart

What is the default password for a MySQL account?

There is no default password

What are the two differences of the --password option compared to the rest of the shared MySQL client options?

1. When no value is supplied on the command line it is prompted
2. In short form there is no space allowed between -p and the password

How do you connect with an empty password?

Use -p or --password on the command line and fill in nothing at the prompt

What does the option --compress do?

It compresses all data sent over the wire

What is the purpose of the [group_names] in MySQL configuration files?

They specify for what program the options are

What is the general group name in a MySQL configuration file specifying all clients?

[client]

What are the default locations for MySQL configurations files on Windows?

Windows directory and then c:\my.ini and c:\my.cnf

What are the default locations for MySQL configuration files on Unix?

/etc/my.cnf and .my.cnf in home directory

What are the 3 options for specifying alternate or no configuration files?

--defaults-file (use this configuration file as default)
--defaults-extra-file (use also this configuration file)
--no-defaults (use no configuration files)

What 2 commands can be used in configuration files to reference other configuration files?

!include <file>
!includedir <directory>

What is the advantage of selecting a default database?

Queries are shorter because you don't have to tell what database every time

What command clears the sql_mode?

SET sql_mode = '';

How do you set both sql_mode ANSI_QUOTES and IGNORE_SPACE?

SET sql_mode = 'ANSI_QUOTES,IGNORE_SPACE';

What are 2 composite sql_modes?

1. ANSI
2. TRADITIONAL

What does the sql_mode TRADITIONAL do?

Enables strict mode + additional restrictions on acceptance of input data

What does the sql_mode ANSI do?

Causes MySQL server to be more ANSI-like

What do sql modes STRICT_ALL_TABLES AND STRICT_TRANS_TABLES do?

Enable strict mode on all tables or transactional tables only

What does the sql mode ERROR_FOR_DIVISION_BY_ZERO do?

By default, division by zero produces a result of NULL and is not treated specially. Enabling this mode causes division by zero in the context of inserting data into tables to produce a warning, or an error in strict mode.

What does the sql mode IGNORE_SPACE do?

Makes a space after a function name permitted (side effect = function names become reserved words)

What does the sql mode ANSI_QUOTES do?

Makes '"' an identifier quoting character instead of a string-quoting character

The question on the page originate from the summary of the following study material:

  • A unique study and practice tool
  • Never study anything twice again
  • Get the grades you hope for
  • 100% sure, 100% understanding
Remember faster, study better. Scientifically proven.
Trustpilot Logo