MySQL is a cross-platform open source relational database management system. At present, MySQL is widely used in small and medium-sized websites on the Internet. Due to its small size, fast speed, low total cost of ownership, especially the characteristics of open source, many small and medium-sized websites choose MySQL as the website database in order to reduce the total cost of ownership. As MySQL is widely used on the Internet and its status in the database field is improving explosively, BAT and other Internet users have removed IOE and used MySQL as the core database in a large number. The market demand for MySQL DBA is increasing rapidly, and good MySQL DBA is the most sought after talent in various Internet companies. More and more IT talents start to become DBAs, so as a DBA, we should first understand that the core goal of a DBA is also the ultimate goal: to ensure the stability, security, integrity and high performance of database management system.

MySQL DBA can be divided into two types: one is development DBA and the other is operation DBA. In general, DBA refers to the operation and maintenance DBA, who is only responsible for the operation and maintenance of database, including the installation, monitoring, backup and recovery of database, while senior or senior DBA has much larger responsibilities and needs to cover the whole life cycle of product from requirement design, test to delivery and launch. In this process, we should not only be responsible for the establishment and operation of the database management system, but also participate in the early database design, the mid-term database testing and the late database capacity management and performance optimization.

For operation and maintenance DBAs, the main responsibilities are as follows:

  • Monitoring: Monitors the running status of database services in real time, including database sessions, database logs, data file fragments, table space monitoring, and user access monitoring. In this way, database service anomalies and resource consumption can be detected at any time. Output important daily database service operating reports to evaluate the overall operating status of database services and find hidden database problems; Monitoring is very important for DBA. It is the third eye of DBA. It can automatically deal with some routine failures and find and solve potential problems in advance.

  • Backup: Develop and implement a database backup plan, restore database information in the event of a disaster, and maintain archived or backup data on appropriate media. Change the database backup policy based on actual requirements and monitor the daily data backup. There are two types of backup: one is scheduled and planned backup, including full backup and incremental backup. Third-party backup tools such as mysqldump and Xtrabackup are commonly used. One is the backup of updates and deletions during DML execution. This backup can be performed in the following ways: Create tableXXx_MMdDHHMM select to create tableXXx_MMdDHHMM select to create tableXXx_MMDDHHMM select to create tableXXx_MMDDHHMM select to create tableXXx_MMDDHHMM Select to create tableXXX_MMDDHHMM Select to create tableXXX_MMDDHHMM Select to create tableXXX_MMDDHHMM Select to create tableXXX_MMDDHHMM Select to create tableXXX_MMDDHHMM Select to create tableXXX_MMDDHHMM In daily database operations, especially as a DBA, always give yourself a back hand that can be easily retrieved when data needs to be recovered.

  • Security audit: Specify different access permissions for different DATABASE management system users to protect the database from unauthorized access and damage. For example, one class of users may be allowed to only retrieve data, while another class of users may have permissions to update data and delete records.

  • Troubleshooting: Handle any database service exceptions in a timely manner to avoid problem expansion or even service suspension. Before this, DBA needs to make plans for various service anomalies, such as machine room/network faults, program bugs and other problems. When problems occur, the plans can be automatically or manually executed to stop losses. In fault handling, the response of THE DBA is crucial. A small fault may lead to a big fault within minutes, which has a greater impact on the business. This tests the emergency and contingency ability of the DBA. For common fault, such as the number of connections of sudden increase, the database server space clean, master-slave synchronization delay, the high CPU usage, can make corresponding plans with research and development, and is combined with monitoring, when reach a certain threshold, using the corresponding script automatic processing, so to a certain extent, reduce the workload and improve the efficiency of fault handling the DBA, More importantly, it buys time for dbAs to prevent further impact of failure escalation on services.

  • Capacity management: planning and implementing resource evaluation, capacity expansion, equipment room migration, and traffic scheduling after database expansion.

  • Database performance optimization: the user experience is the most important point for the product to provide external services, and the usability and response speed of the product are very important in the user experience. How to support products with the most reasonable resources to provide high availability and high speed user experience is also an important responsibility of DBAs. During my years of DBA career, I have concluded that 80% or even higher database failures are caused by abnormal SQL statements, about 10% are caused by unreasonable design of database architecture, and about 10% are caused by hardware and OS. So the basic optimization focus is the optimization of SQL, this needs to carry out training for the development of MySQL development specifications, formulate strict SQL access rules, review each ONLINE SQL statement, block most of the SQL source, and then is the monitoring and analysis of slow SQL, regularly sent to the research and development for rectification, And urge r&d to rectify within the time limit. This part of the work is tedious and dull, but if properly executed, it can eliminate many unnecessary failures and ensure the efficient and stable operation of the business. This part of the work tests the basic theoretical knowledge of THE DBA, the responsibility of the DBA and the perseverance of the work.

In my opinion, the basic skills of a good DBA include: Understand data backup/recovery and disaster recovery, use common dbAs’ toolsets, know how to quickly find answers, know how to monitor and optimize numbers Database performance, as far as possible to achieve automation, capacity monitoring and planning, index design, database design, database security, constantly learning and researching new versions, can write independent or system function scripts. These skills basically cover MySQL basic theoretical knowledge, OS level knowledge, hardware knowledge, network knowledge, code writing ability, architecture design and planning ability, monitoring, operation and maintenance concept, operation and maintenance automation, etc. Therefore, as a DBA, not only database level, basic knowledge covers many levels, so it can be said that DBA is a compound professional with high comprehensive knowledge.

Character determines destiny, attitude determines everything, and so does DBA. Character determines height, attitude determines level. Some dbas do for many years, is still a marginal man, become a technical backbone, in the final analysis may be associated with the character of itself, adventurous, work is not active, said, how much do how much do things sloppy, not keen, can make do, such as the concept of time is not strong, some people think that give me 1000 dollars a month of wages, why I live up to 1001 pieces? As long as there is no man-made accident on the line, natural disaster and man-made disaster oneself unlucky, such character will not have outstanding achievements in personal career. Met some dbas are books, theory of skills is certainly no problem, but work is coarse, considering issues is not comprehensive, occasionally a little accident, sometimes doing things always feel ok to go, the interview gives the impression of is likely to be very good, but you can see it works questions, every business in a company for the DBA to stay time is not long, After all, the eyes of the masses are clear. Every company and every leader needs people who can work and do the work well. A good DBA, the DBA should be in my heart of perfectionism, should have rigid quality contains serious and meticulous work, thinking, good communication skills and teamwork spirit, self drive or work initiative is strong, tough willpower and calm attitude, strong curiosity and confidence, etc.; Basic skills are the foundation, the prerequisite for a DBA, just the foundation, and a good personality and attitude will determine how far you can go in your career if you speak of excellence.

We all know the truth, really can really implement the actual few, it is these few people, become the backbone of the industry, the so-called cattle! Finally, I want to say that there is no best in all industries, only more cattle, endless learning, in the study and practice to improve, strengthen their ability in all aspects, and constantly improve themselves. Down-to-earth work, a dignified life, can not change others, try your best, do your best!