Database Reference
In-Depth Information
Using MariaDB
This chapter will focus on using the command-line mysql client to perform common
tasks. We'll learn about creating and dropping databases and tables, making
modifications to our tables, inserting and updating data, viewing the results, and
more. When finished we will have a good grasp of the basics. We'll know our way
around, a skill which is always useful, even if we end up spending most of our time
using graphical point-and-click clients, or applications that interact with the database
for us.
Running the mysql command-line client
A big part of becoming a MariaDB expert is learning how to effectively and
efficiently use the command-line mysql client program. Many MariaDB users interact
with the server using custom programs that have been developed specifically for
or by them. At a lower level though, every interaction these applications have with
MariaDB can be done with the command-line client.
MariaDB has a client-server architecture, which means there are two parts to it: the
server, which is the part that does the heavy behind-the-scenes stuff, and the client,
which is the part we use to access and interact with the server. We hardly ever
interact directly with the server part. There are many different clients for MariaDB,
but only one is maintained by the MariaDB developers and included with every copy
of MariaDB—the mysql command-line client.
To start the client, we open up a command-line or terminal window and type mysql
with some options and press Enter . The basic syntax is as follows:
mysql [-u <user>] [-p] [-h <host>] [<database>]
Search WWH ::




Custom Search