The MySQL Package
The MySQL package comes with several programs. Foremost is the MySQL server, represented by the mysqld daemon. The daemon listens for requests on a particular port (3306 by default) by which clients submit queries. The standard MySQL client program is simply called mysql. With this text-based interface, a user can log in and execute SQL queries. This client can also accept queries from text files containing queries, and thereby execute them on behalf of the user or other software. However, most MySQL use is done by programs using a variety of languages. The interfaces for Perl, PHP, and C are discussed in this book.
A few wrapper scripts for
mysqld come with MySQL. The
mysqld_safe script is the most common way to start
mysqld, because the script can restart the
daemon if it crashes. This helps ensure minimal downtime for database
services. The script mysqld_multi is used to start
multiple sessions of mysqld_safe, and thereby
multiple mysqld instances, for handling requests
from different ports and different Unix socket files, and to make it
easier to serve different sets of databases. For MS Windows NT and
2000 servers, there's mysqld-nt.
It supports the named pipes that some Windows systems use instead of
socket files.
MySQL also comes with a variety of utilities for managing a MySQL server. mysqlaccess is used for creating user accounts and setting their privileges. mysqladmin can be used to manage the MySQL server itself from the command line. This interaction ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access