client is a primitive way of interfacing with a database and generally isn’t
used by end users. As a DBA, however, you use the command-line client to
test new queries interactively without having to write front-end programs for
that purpose. In later sections of this chapter, you discover a bit about the
MySQL graphical client and the web-based database administration interfaces
available for both MySQL and PostgreSQL.
The following sections examine two common methods of accessing a remote
database, a method of local access to a database server, and the concept of
web access to a database.
NOTE
You should consider access and permission issues when setting up a
database. Should users be able to create and destroy databases? Or should
they only be able to use existing databases? Will users be able to add
records to the database and modify existing records? Or should users be
limited to read-only access to the database? And what about the rest of the
world? Will the general public need to have any kind of access to your
database through the Internet? As a DBA, you must determine the answers
to these questions.
SSH Access to a Database
Two types of remote database access scenarios are briefly discussed in this
section. In the first scenario, the user directly logs in to the database server
through Secure Shell (SSH) (to take advantage of the security benefits of
encrypted sessions) and then starts a program on the server to access the
database. In this case, shown in Figure 28.4, the database client is running on
the database server itself.