Mysql management introduction

xiaoxiao2021-04-08  308

Run

Database system,

The use of mysql is quite simple, and there is very little work required for MySQL installation and use. The simplicity of mysql may be the reason why it is extremely popular, especially in the non-service population. Of course, it is also helpful for trained computer professionals, but it is definitely not the need to run a successful MySQL installer.

However, no matter what level of experts, MySQL installation programs cannot be run automatically. There must be someone to monitor it to ensure that it can run smoothly and effectively, sometimes you must know

What should I do when the problem occurs. If the problem occasionally falls on your head, you should keep reading this book in your way.

In the third part of this book, we will discuss all aspects regarding mysql management. This chapter gives you to understand and include an overview of the relevant responsibilities in the management MySQL installer, and also provides a brief description of these responsibilities, and gives guidance in the later chapters.

If you are a novice or unpredictable mysql administrator, don't let the list of lengthy duties appear in this chapter. Each task listed in the following section is important, however, you don't need to learn them immediately. If you want to do this, you can use the contents of this section as a reference. When you feel that you need to know what it is, you can find these

theme.

If you have experience in managing other database systems, you will find that the installer running MySQL is similar to some aspects, and your experience is also used. But MySQL management has its own unique needs, this part of this book will help you familiar with these content.

Management Responsibilities Overview

The MySQL database system consists of several parts. You should be familiar with the content of these components and the purpose of each part. This requires you to understand the features of the managed system and help you manage the available tools. If you take time to understand what you want to supervise, work will become very easy. To do this, you should make yourself familiar with the following aspects of MySQL:

Mysql

server. Server MySQL performs all the operations of the database and tables. SAFE_MYSQLD is a related program that is used to start the server, monitor the server, and restart the server.

MySQL client and utility. There are several MySQL programs that can be used to help you perform with the server.

Communication and implementation of management tasks. The most important one is:

MySQL, an interactive program allows the SQL statement to be published onto the server and browse results.

MySQLA D m i n, a manager allows you to perform jobs such as shut down the server and create or delete the database. If the server is not working properly, you can also check the status of the server with mysqladmin.

ISAMCHK and MY I S A M C HK, these utilities help you complete the analysis and optimization of the table and recovery when the table is damaged.

MySQLD UM P, a tool for backing up the database or copy the database to another server.

Server language, SQL. Some management responsibilities can only be done with the mysqladmin command line utility, but if you can use the server to talk to the server with the server, it is better. As a simple example, you may need to find the user privilege without working on the way you want. No alternatives can participate in and communicate with the server. This can be done by using the MySQL client program to issue SQL queries that can be verified. If your MySQL version has not introduced a GRANT statement, you need to use MySQL to first set the permissions of each user.

If you don't know any content of SQL, you must at least have basic understanding of SQL. The lack of familiarity with SQL will only bring you confusion, and the time spent on SQL will be doubled. Really master SQL takes some time, but mastering basic skills is very fast. If you need to understand the introduction of the SQL and MySQL command line clients, see "MySQL and SQL Introduction" mysql data directory of Chapter 1. The data directory is where the server stores its database and status file. Understanding the structure and content of the data directory is important, you can know how the server uses the file system to express the database and table, and the location of the file like the log and its content. You should also understand the options to manage disk space allocation in the file system, which can be adjusted when the file system that places the data directory is over.

Routine management

General management mainly refers to the operation of processing the MySQLD, MySQL server, and access server provided to the user. The following tasks is the most important when performing the duties:

The server is started and closed. You should be able to manually start and terminate the server from the command line, and know how to start and close when the system is started and off. If the server crashes or starts abnormal, it is important to make the server run again.

User account maintenance. You should learn about mysql users and UNIX or

The difference between Windows users. It should be known how to establish a MySQL user account by specifying which users can connect to the server and connect from where to connect. The new user should also recommend the appropriate connection parameters to successfully connect to the server. How to establish an account is not the job of users.

Log file maintenance. It should be aware of the type of log file that can be maintained, and how to complete the log file in the log file. The loop and termination of the log will be necessary to prevent the log fill the file system.

Database backups and copies. Database backups are critical to the crash of the server system. You should be able to restore the database to the occurrence of the crash to reduce the loss of data as much as possible. Note that the database backup is different from a regular system backup, for example, can be performed by using UNIX DUMP programs. Files corresponding to database tables change as server activities when the system backup, so restoring those files will make your table inconsistent. MySQLDUMP programs will generate backup files for restoring databases, and allow a backup to be created without closing the server.

If you decide to run the database on a faster host, or if you want to copy the database, you will need to copy your content to another machine. If necessary, you should learn about the process of performing this action. Database files are dependent on the system, so you can't copy these files.

Server optimization. The user wants the server to run in the best state. The easiest way to improve server running performance is to purchase more memory or make disk speed faster. However, this straightforward technology does not replace the work of the server. You should find out that the parameters used by the optimization server operation and how to apply these parameters in your environment. In some sites, most queries are retrieved. And in other sites, insert and update operations occupy an advantage. Select which parameters will be modified to be affected by the site query.

Multiple servers. Running multiple servers in some environments is useful. If you keep the current finished installer in your proper location, or provide better confidentiality for different user groups (the latter is particularly related to ISP), you can test the new MySQL version. For these situations, you should learn how to build multiple simultaneous installations.

MySQL update. Since new MySQL versions frequently appear, you should know how to keep up with these versions to use fault repair and new features. Need to understand the reasons that do not have version upgrades, and master how to choose between stabilization and developer versions.

safety

When running the MySQL installer, make sure that the security of the data stored by the user is important. MySQL administrator has a responsibility to control access to data directories and servers, and you should learn about the following questions:

The security of the file system. UNIX machines may make several user accounts a host account, and these accounts have no relevant management responsibilities with MySQL. Make sure that these accounts do not have access to the data directory. Because it can prevent them from corrupted by copying database tables or moving database tables or by reading log files with sensitive information. You should know how to build a UNIX user account of the MySQL server, how to build the data directory owned by the user, and how to start the server to use the user's permissions. Server security. Must understand how the mysql security system works to grant appropriate permissions when establishing user accounts. Users connected to the server via the network only allow for what they should do. You don't have to grant an anonymous user from anonymous user due to the wrong understanding of the security system.

Database Repair and Maintenance

All mysql administrators want to avoid dealing with destroyed or destroyed database tables. But the desire can not replace the reality. The following steps allow you to reduce risks during your problem and learn how to handle problems:

Crash recovery. If you do the best effort but the disaster is still, you should know how to fix or recover the table. I rarely use crash recovery, but when using it, it is an annoying, high-intensive job (especially when you are being positively fixing some content, the phone is ringing or tapping the door). However, you must know how to deal with it, otherwise the user will be very unhappy. To be familiar with the checks and repair capabilities of Isamchk and Myisamchk;

Preventive maintenance. A general procedure for preventive maintenance should be placed properly to minimize the possibility of database damage and destruction. Of course, you have to make backups, however, preventive maintenance will reduce opportunities to use these backups.

The above summarizes the responsibilities of the mysql administrator. Chapter 10 will discuss these responsibilities in detail and provide operational processes to effectively fulfill these responsibilities. We will first discuss the mysql data directory, which is the resource you are managed, so we should understand its layout and content. Then discuss conventional management responsibilities, MySQL security systems, and maintenance and troubleshooting.

转载请注明原文地址:https://www.9cbs.com/read-132928.html

New Post(0)