Home Database Mysql Tutorial mysqlcheck:表维护和维修程序

mysqlcheck:表维护和维修程序

Jun 07, 2016 pm 04:16 PM
program repair maintain

mysqlcheck客户端可以检查和修复MyISAM表。它还可以优化和分析表。 mysqlcheck的功能类似myisamchk,但其工作不同。主要差别是当mysqld服务器在运行时必须使用mysqlcheck,而myisamchk应用于服务器没有运行时。使用mysqlcheck的好处是不需要停止服务器来检查

mysqlcheck客户端可以检查和修复MyISAM表。它还可以优化和分析表。

  mysqlcheck的功能类似myisamchk,但其工作不同。主要差别是当mysqld服务器在运行时必须使用mysqlcheck,而myisamchk应用于服务器没有运行时。使用mysqlcheck的好处是不需要停止服务器来检查或修复表。

  Mysqlcheck为用户提供了一种方便的使用SQL语句CHECK TABLE、REPAIR TABLE、ANALYZE TABLE和OPTIMIZE TABLE的方式。它确定在要执行的操作中使用使用哪个语句,然后将语句发送到要执行的服务器上。

  有3种方式来调用mysqlcheck:

  shell> mysqlcheck[options] db_name [tables]

  shell> mysqlcheck[options] ---database DB1 [DB2 DB3...]

  shell> mysqlcheck[options] --all--database

  如果没有指定任何表或使用---database或--all--database选项,则检查整个数据库。

  同其它客户端比较,mysqlcheck有一个特殊特性。重新命名二进制可以更改检查表的默认行为(--check)。如果你想要一个工具默认可以修复表的工具,只需要将mysqlcheck重新复制为mysqlrepair,或者使用一个符号链接mysqlrepair链接mysqlcheck。如果调用mysqlrepair,可按照命令修复表。

  下面的名可用来更改mysqlcheck的默认行为:

  mysqlrepair   默认选项为--repair

  mysqlanalyze   默认选项为--analyze

  mysqloptimize   默认选项为--optimize

  mysqlcheck

  支持下面的选项:

  ·         ---help,-?

  显示帮助消息并退出。

  ·         --all--database,-A

  检查所有数据库中的所有表。与使用---database选项相同,在命令行中命名所有数据库。

  ·         --all-in-1,-1

  不是为每个表发出一个语句,而是为命名数据库中待处理的所有表的每个数据库执行一个语句。

  ·         --analyze,-a

  分析表。

  ·         --auto-repair

  如果某个被检查的表破坏了,自动修复它。检查完所有表后自动进行所有需要的修复。

  ·         --character-sets-dir=path

  字符集的安装目录。参见5.10.1节,“数据和排序用字符集”。

  ·         --check,-c

  检查表的错误。

  ·         --check-only-changed,-C

  只检查上次检查以来已经更改的或没有正确关闭的表。

  ·         --compress

  压缩在客户端和服务器之间发送的所有信息(如果二者均支持压缩)。

  ·         ---database,-B

  处理数据库中命名的所有表。使用该选项,所有字名参量被看作数据库名,而不是表名。

  ·         ---debug[=debug_options],-# [debug_options]

  写调试日志。debug_options字符串通常为'd:t:o,file_name'。

  ·         --default-character-set=charset

  使用charsetas默认字符集。参见5.10.1节,“数据和排序用字符集”。

  ·         --extended,-e

  如果你正使用该选项来检查表,可以确保它们100%地一致,但需要很长的时间。

  如果你正使用该选项来修复表,则运行扩展修复,不但执行的时间很长,而且还会产生大量的垃圾行!

  ·         --fast,-F

  只检查没有正确关闭的表。

  ·         --force,-f

  即使出现SQL错误也继续。

  ·         --host=host_name,-h host_name

  连接给定主机上的MySQL服务器。

  ·         --medium-check,-m

  执行比--extended操作更快的检查。只能发现99.99%的错误,在大多数情况下这已经足够了。

  ·         --optimize,-o

  优化表。

  ·         --password[=password],-p[password]

  当连接服务器时使用的密码。如果使用短选项形式(-p),选项和 密码之间不能有空格。如果在命令行中--password或-p选项后面没有 密码值,则提示输入一个密码。

  ·         --port=port_num,-P port_num

  用于连接的TCP/IP端口号。

  ·         --protocol={TCP | SOCKET | PIPE | MEMORY}

  使用的连接协议。

  ·         --quick,-q

  如果你正使用该选项在检查表,它防止扫描行以检查错误链接的检查。这是最快的检查方法。

  如果你正使用该选项在修复表,它尝试只修复索引树。这是最快的修复方法。

  ·         --repair,-r

  执行可以修复大部分问题的修复,只是唯一值不唯一时不能修复。

  ·         --silent,-s

  沉默模式。只打印错误消息。

  ·         --socket=path,-S path

  用于连接的套接字文件。

  ·         --tables

  覆盖---database或-B选项。选项后面的所有参量被视为表名。

  ·         --user=user_name,-u user_name

  当连接服务器时使用的MySQL用户名。

  ·         --verbose,,-v

  冗长模式。打印关于各阶段程序操作的信息。

  ·         --version,-V

  显示版本信息并退出。

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Two Point Museum: All Exhibits And Where To Find Them
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to make Google Maps the default map in iPhone How to make Google Maps the default map in iPhone Apr 17, 2024 pm 07:34 PM

The default map on the iPhone is Maps, Apple's proprietary geolocation provider. Although the map is getting better, it doesn't work well outside the United States. It has nothing to offer compared to Google Maps. In this article, we discuss the feasible steps to use Google Maps to become the default map on your iPhone. How to Make Google Maps the Default Map in iPhone Setting Google Maps as the default map app on your phone is easier than you think. Follow the steps below – Prerequisite steps – You must have Gmail installed on your phone. Step 1 – Open the AppStore. Step 2 – Search for “Gmail”. Step 3 – Click next to Gmail app

How to write a simple countdown program in C++? How to write a simple countdown program in C++? Nov 03, 2023 pm 01:39 PM

C++ is a widely used programming language that is very convenient and practical in writing countdown programs. Countdown program is a common application that can provide us with very precise time calculation and countdown functions. This article will introduce how to use C++ to write a simple countdown program. The key to implementing a countdown program is to use a timer to calculate the passage of time. In C++, we can use the functions in the time.h header file to implement the timer function. The following is the code for a simple countdown program

Clock app missing in iPhone: How to fix it Clock app missing in iPhone: How to fix it May 03, 2024 pm 09:19 PM

Is the clock app missing from your phone? The date and time will still appear on your iPhone's status bar. However, without the Clock app, you won’t be able to use world clock, stopwatch, alarm clock, and many other features. Therefore, fixing missing clock app should be at the top of your to-do list. These solutions can help you resolve this issue. Fix 1 – Place the Clock App If you mistakenly removed the Clock app from your home screen, you can put the Clock app back in its place. Step 1 – Unlock your iPhone and start swiping to the left until you reach the App Library page. Step 2 – Next, search for “clock” in the search box. Step 3 – When you see “Clock” below in the search results, press and hold it and

How to open a website using Task Scheduler How to open a website using Task Scheduler Oct 02, 2023 pm 11:13 PM

Do you frequently visit the same website at about the same time every day? This can lead to spending a lot of time with multiple browser tabs open and cluttering the browser while performing daily tasks. Well, how about opening it without having to launch the browser manually? It's very simple and doesn't require you to download any third-party apps, as shown below. How do I set up Task Scheduler to open a website? Press the key, type Task Scheduler in the search box, and then click Open. Windows On the right sidebar, click on the Create Basic Task option. In the Name field, enter the name of the website you want to open and click Next. Next, under Triggers, click Time Frequency and click Next. Select how long you want the event to repeat and click Next. Select enable

Honor Magic V2 RSR internal screen repair price announced: Replacing the internal screen will cost 5,279 yuan Honor Magic V2 RSR internal screen repair price announced: Replacing the internal screen will cost 5,279 yuan Jan 14, 2024 am 08:48 AM

According to news on January 12, at 10:08 this morning, the Honor Magic V2RSR Porsche Design version was officially launched for sale. The 16GB+1TB price is 15,999 yuan, making it one of the most expensive mobile phones in Honor’s history. In addition to the high price, the price of repair and spare parts for the new machine has also been announced on the official website, which is also more expensive than the previous standard version and premium version. Overall, the internal screen and motherboard of Honor MagicV2RSR are the most expensive. An internal screen costs 5,279 yuan, and the motherboard costs 5,599 yuan. Either one is enough to buy a Huawei Mate60 mobile phone (12GB+256GB priced at 5,499 yuan). However, the screen and motherboard are also the core of a folding screen mobile phone, and they are also the difficult points to overcome with folding screens. Naturally, they are more expensive than ordinary candy bar phones.

iOS 17: How to organize iMessage apps in Messages iOS 17: How to organize iMessage apps in Messages Sep 18, 2023 pm 05:25 PM

In iOS 17, Apple not only added several new messaging features, but also tweaked the design of the Messages app to give it a cleaner look. All iMessage apps and tools, such as the camera and photo options, can now be accessed by tapping the "+" button above the keyboard and to the left of the text input field. Clicking the "+" button brings up a menu column with a default order of options. Starting from the top, there's camera, photos, stickers, cash (if available), audio, and location. At the very bottom is a "More" button, which when tapped will reveal any other installed messaging apps (you can also swipe up to reveal this hidden list). How to reorganize your iMessage app You can do this below

Can't allow access to camera and microphone in iPhone Can't allow access to camera and microphone in iPhone Apr 23, 2024 am 11:13 AM

Are you getting "Unable to allow access to camera and microphone" when trying to use the app? Typically, you grant camera and microphone permissions to specific people on a need-to-provide basis. However, if you deny permission, the camera and microphone will not work and will display this error message instead. Solving this problem is very basic and you can do it in a minute or two. Fix 1 – Provide Camera, Microphone Permissions You can provide the necessary camera and microphone permissions directly in settings. Step 1 – Go to the Settings tab. Step 2 – Open the Privacy & Security panel. Step 3 – Turn on the “Camera” permission there. Step 4 – Inside, you will find a list of apps that have requested permission for your phone’s camera. Step 5 – Open the “Camera” of the specified app

Identity matrix program in C language Identity matrix program in C language Aug 30, 2023 am 10:45 AM

Given a square matrix M[r][c], where "r" is a certain number of rows and "c" are columns such that r=c, we have to check if "M" is the identity matrix. Identity matrix Identity matrix is ​​also known as identity matrix of size nxn square matrix in which the integer value of diagonal elements is 1 and the integer value of non-diagonal elements is 0 like the example given below-$$I1=\ begin{bmatrix}1\end{bmatrix},\I2=\begin{bmatrix}1&0\0&1\end{bmatrix},\I3=\begin{bmatrix}1&0&0\0&1&0\0&amp

See all articles