Ubuntu Unleashed 2019 Edition: Covering 18.04, 18.10, 19.04

(singke) #1

The front end is the user’s web browser, the client is running on Leopard,
and the server is running on Simba.


In another possible web access scenario, it could be said that the client is a
two-piece application in which part of it is running on the user’s workstation
and the other part is running on the web server. For example, a database
programmer can use JavaScript in the web form to ensure that the user has
entered a valid query. In this case, the user’s query is partially processed on
the user’s own workstation and partially on the web server. Error checking is
done on the user’s own workstation, which helps reduce the load on the server
and also helps reduce network traffic because the query is checked for errors
before being sent across the network to the server.


The MySQL Command-Line Client


The MySQL command-line client is mysql, and it has the following syntax:


Click here to view code image
mysql [options] [database]


Some of the available options for mysql are discussed in Table 28.1.
database is optional, and if given, it should be the name of the database to
which you want to connect.


Table 28.1 Command-Line Options to Use When Invoking mysql


Option Action

-h
hostname

Connects    to  the remote  host    hostname    (if the database    server  isn’t
located on the local system).

-u
username

Connects    to  the database    as  the user    username.

-p Prompts  for a   password.   This    option  is  required    if  the user    you are
connecting as needs a password to access the database. Note that
this is a lowercase p.

-P n Specifies  n   as  the number  of  the port    that    the client  should  connect
to. Note that this is an uppercase P.

-? Displays a   help    message.
Free download pdf