Database Reference
In-Depth Information
Part I. The Software
At the heart of what is collectively known as MySQL and MariaDB is the server. The term
server
in this context refers to software, not a primary computer on which it may be run-
ning. The server maintains, controls, and protects your data, storing it in files on the com-
puter where the server is running in various formats. The server listens for requests from
other software that is running (called clients in this context). The term
client
refers to soft-
ware, not a computer. A client and server software may be running on the same computer,
which can be a personal laptop computer.
We'll start by using a command-line client where you type in requests manually. Then
we'll graduate to issuing the requests from programs that can back up web servers and oth-
er uses for the data. It's not necessary for you to know all of the files and programs that
make up MySQL. There are, though, a few key ones of which you should be aware.
One key program is the server itself,
mysqld
(the
d
stands fordaemonand is a common
term for a server). The name is the same in both MySQL and MariaDB. This daemon must
be running in order for users to be able to access data and make changes. As an adminis-
trator, you have the ability to configure and set
mysqld
to suit your database system
needs. The daemon is mentioned where relevant in various chapters throughout this topic.
Another key program, used extensively through this topic, is the basic MySQL client,
called simply,
mysql
. With it, you can interact with the
mysqld
daemon, and thereby the
databases. It's a textual user interface. There's nothing fancy about it — a mouse is not
needed to use it. You simply type in the SQL statements that you will learn about in this
topic. The results of queries are displayed in ASCII text. It's very clean looking, but no
graphics are involved. It's also very fast, as there's nothing but text (i.e., there are no binar-
cause most MySQL developers and administrators prefer the
mysql
client, and what you
type in
mysql
is the same as what is passed to the server by a GUI client, I cover it exclus-
ively.