Team LiB
Previous Section Next Section

General Administration

General administration deals primarily with the operation of mysqld, the MySQL server, and with providing your users with access to the server. The following duties are most important in carrying out this responsibility:

  • Server startup and shutdown. You should know how to start and stop the server manually from the command line and how to arrange for automatic startup and shutdown when your system starts and stops. It's also important to know what to do to get the server going again if it crashes or will not start properly.

  • User account maintenance. You should understand the difference between MySQL user accounts and Unix or Windows login accounts. You should know how to set up MySQL accounts by specifying which users can connect to the server and where they can connect from. New users should also be advised on the proper connection parameters that they will need to use to connect to the server successfully; it's not their job to figure out how you've set up their accounts. You'll also need to know how to reset forgotten passwords.

  • Log file maintenance. You should understand what types of log files are available and which ones will be useful to you, as well as when and how to perform log file maintenance. Log rotation and expiration are essential for preventing the logs from filling up your filesystem.

  • Server configuration and tuning. The MySQL server is highly configurable. Some of the operational characteristics that you can control include which storage engines the server uses, the character sets that it supports, and its default time zone.

    Another configuration issue involves server tuning. Your users want the server to perform at its best. The quick-and-dirty method for improving how well your server runs is to buy more memory or to get faster disks. But those brute-force techniques are no substitute for understanding how the server works. You should know what parameters are available for tuning the server's operation and how they apply to your situation. At some sites, queries tend to be mostly retrievals. At others, inserts and updates dominate. The choice of which parameters to change will be influenced by the query mix that you observe at your own site.

  • Multiple servers. It's useful to run multiple servers on the same machine under some circumstances. You can test a new MySQL release while leaving your current production server in place, or provide better privacy for different groups of users by giving each group its own server. (The latter scenario is particularly relevant to Internet service providers.) For such situations, you should know how to set up multiple simultaneous installations.

  • Database replication. Making a backup or a copy of a database takes a snapshot of its state at one point in time. Another option available to you is to use replication, which involves setting up two servers in cooperative fashion such that changes to databases managed by one server are propagated on a continuing basis to the corresponding databases managed by the other server.

    You should know how to set up a server as a master replication server, and how to set up slave servers that replicate the master. If trouble occurs and replication stops, you must know where to look to identify the problem and how to get replication started again.

  • MySQL software updates. New MySQL releases appear frequently. You should know how to keep up to date with these releases to take advantage of bug fixes and new features. Understand the circumstances under which it's more reasonable to hold off on upgrading, and know how to choose between the stable and development releases.

    Team LiB
    Previous Section Next Section