MySQL Tutorial

In this chapter we will cover the day-to-day administration activities associated with running a MySQL database, including the following:

  • Starting up and shutting down

  • Getting information about the server and databases

  • Setting variables

  • Killing threads

  • Clearing caches

  • Analyzing tables

  • Understanding the log files

Although this chapter is structured in a task-oriented fashion, we will make use of one important script, mysqladmin , for several of these tasks .

The mysqladmin script is used with appropriate parameters to perform a wide variety of administrative tasks. A summary of these appears at the end of this chapter.

We will also cover the use of the mysqlshow and mysqlcheck scripts and the KILL , RESET , CHECK , REPAIR , and ANALYZE TABLE SQL commands in this chapter.

Категории