预防性维护MySQL数据库服务器详解[组图]_MySQL
建立一个预防性维护的时间表,以协助自动检测问题,使得您可以采取措施进行修正:
1) 执行常规的数据库备份并允许更新日志。
2) 安排定期的常规表检查。通过检查表,将减少使用备份的机会。这个工作使用cron 作业(一般从运行服务器所使用的该账号的crontab 文件中调用)并且很容易实现。例如,如果您作为mysqladm 用户运行服务器,则可以从mysqladm 的crontab 文件中建立定期检查。如果您不知道如何使用c r o n,应使用下列命令查看相关的UNIX 人工页:
% man cron
% man crontab
3) 在服务器启动前的系统引导期间检查数据库表。机器可能会因早期的崩溃重新启动。如果是这样的话,数据库表可能已被毁坏,应该对它进行检查。
为了运行自动的表检查,可以编写一个脚本,将目录改变为服务器数据目录并对所有数据库表运行myisamchk 和i s a m c h k。我们将在下面讨论的脚本中同时使用这两个程序。如果您只有MyISAM 表或只有ISAM 表,则只需其中一个程序,可以将无关的那个程序从脚本中去除。
myisamchk 和isamchk 都根据表检查的方式产生某些输出结果以便了解正在检查哪些表,甚至在没有问题时也是如此。对于crontab 的项,除非表中有错误,否则通常将禁止输出结果(如果作业产生任何输出, cron 作业通常生成一个邮件消息,很少会收到没有任何问题的表检查作业的邮件)。如果用--silent 选项调用任一个实用程序,它仅当发现问题时才产生输出。另外,myisamchk 支持--fast 选项,该选项允许程序跳过自上次检查以来没有被修改过的任何表。
在服务器数据目录中检查所有表的一个简单的脚本如下( DATADIR 应该修改成对应您系统的值):
实用此脚本的一个潜在的问题是:如果有许多表,通配符模式‘ * / * . M Y I’或‘* / * . I S M’可能会由于“ too many arg um e n t s(过多的参数)”错误使外壳程序爆炸。另一个可选择的脚本如下(同样,将DATADIR 改变为对应您系统的值):

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



The program being executed is called a process. A process can be an application running on the current operating system or an application related to the operating system. If an application is tied to the operating system, it first creates a process to execute itself. Other applications rely on operating system services for execution. Most applications are operating system services and background applications that maintain the operating system, software, and hardware. In python we have different methods to check if application is open or not. Let’s learn about them in detail one by one. Using the psutil.process_iter() function psutil is a module in Python that provides users with an interface to retrieve information about running processes and system utilization.
![Spellcheck not working in Teams [Fixed]](https://img.php.cn/upload/article/000/887/227/170968741326618.jpg?x-oss-process=image/resize,m_fill,h_207,w_330)
We've started noticing that sometimes spellcheck stops working for Teams. Spell check is an essential tool for effective communication, and any attack on it can cause considerable disruption to workflow. In this article, we'll explore common reasons why spell check might not be working as expected, and how to restore it to its previous state. So, if spell check is not working in Teams, follow the solutions mentioned in this article. Why doesn't Microsoft spell check work? There may be several reasons why Microsoft spell check is not working properly. These reasons include incompatible language settings, disabled spell check function, damaged MSTeam or MSOffice installation, etc. Also, outdated MSTeams and MSOf

An iterable object is an object whose all elements can be iterated over using a loop or iterable function. Lists, strings, dictionaries, tuples, etc. are all called iterable objects. In Python language, there are various ways to check whether an object is iterable. Let’s take a look one by one. Using Loops In Python, we have two looping techniques, one is using "for" loop and the other is using "while" loop. Using either of these two loops, we can check if a given object is iterable. Example In this example, we will try to iterate an object using "for" loop and check if it is iterated or not. Below is the code. l=["apple",22,"orang

How to check SSD health status in Windows 11? For their fast read, write, and access speeds, SSDs are quickly replacing HDDs, but even though they are more reliable, you still need to check the health of your SSDs in Windows 11. How to operate it? In this tutorial, the editor will share with you the method. Method 1: Use WMIC1, use the key combination Win+R, type wmic, and then press or click OK. Enter2. Now, type or paste the following command to check the SSD health status: diskdrivegetstatus If you receive the "Status: OK" message, your SSD drive is operating normally.

You can use the contains() method of the List interface to check whether an object exists in the list. contains() method booleancontains(Objecto) Returns true if this list contains the specified element. More formally, returns true if and only if this list contains at least one element e such that (o==null?e==null:o.equals(e)). Parameter c - the element whose presence in this list is to be tested. Return Value Returns true if this list contains the specified element. Throws ClassCastException - if the specified element's type is incompatible with this list (optional). NullP

How to check if a string starts with a specific character in Golang? When programming in Golang, you often encounter situations where you need to check whether a string begins with a specific character. To meet this requirement, we can use the functions provided by the strings package in Golang to achieve this. Next, we will introduce in detail how to use Golang to check whether a string starts with a specific character, with specific code examples. In Golang, we can use HasPrefix from the strings package

Please consider the table below to know the eligibility criteria of different companies - The Chinese translation of CGPA is: GPA greater than or equal to 8 Eligible companies Google, Microsoft, Amazon, Dell, Intel, Wipro greater than or equal to 7 Tutorial points, accenture, Infosys , Emicon, Rellins greater than or equal to 6rtCamp, Cybertech, Skybags, Killer, Raymond greater than or equal to 5Patronics, Shoes, NoBrokers Let us enter the java program to check the eligibility of tpp students for interview. Method 1: Using ifelseif condition Normally when we have to check multiple conditions we use

Our computer screens emit blue light, just like the light from the sun. This light is not that harmful. But on other nights when the lighting is slightly warmer, you'll eventually experience eye strain as you stare at the brighter blue light emitting from your computer screen for longer. Of course, you probably know all of this, and you probably already know about the night light feature that your windows have, which helps block the emission of blue light and instead uses warmer colors that are pleasant to your eyes. You've probably turned this feature on every time you feel like your eyes are burning too. But did you know you can set a schedule that automatically enables and disables the night light feature? If you don’t know yet, keep reading! Step 1: To launch the Settings app, press WIN+ simultaneously
