Check and Optimize MySQL Database Automatically with Crontab/Cron MySQLデータベースの最適化を自動的にチェックのcrontab / cronの

MySQL is a very popular free yet powerful database system. MySQLは非常に人気のある無料の強力なデータベースシステムはまだありません。 But even in great databases, the tables may get fragmented with overhead due to continuous update, or delete and insert operation on data stored in database.しかし、大きなデータベースでも、そのテーブルのオーバーヘッドがあります。断片化のために継続的に更新、または挿入操作上のデータを削除してデータベースに格納されています。 Beside, it’s also possibility that the databases may get corrupted.横に、データベースの可能性があることも5月に破損しています。 Thus, performing health check on database and optimize MySQL server regularly is an important task.したがって、舞台の健康をチェックするデータベースとMySQLサーバの最適化を定期的には、重要な仕事です。

It’sa bit troublesome if the database administrators have to login to the server or launching the phpMyAdmin to optimize the databases one by one or table by table manually.これはビット面倒な場合は、データベース管理者は、打ち上げにログインするには、サーバーやphpMyAdminのデータベースを最適化してテーブルを1つのテーブルを1つまたは手動で作成します。 Sometimes DB admin may simply forgets to do the job or set the frequency of optimization to lesser times.時にはdBの管理者を忘れることは、単に仕事または設定するには、周波数の最適化を小回クリックします。 It’s recommended that every tables in MySQL databases are checked at least once a day on a busy server.することをお勧めMySQLデータベースのテーブルのすべてのチェックボックスを、少なくとも一日に一度は、忙しいサーバです。

It’s possible to automate the optimization of MySQL process by using crontab function in Linux/Unix/CentOS/FreeBSD.最適化することが可能にMySQLのプロセスを自動化するcrontabの関数を使用してLinux / Unix版/ CentOS版/ FreeBSDのです。 The cron job to check and optimize MySQL databases can be created by using mysqlcheck client utility comes MySQL installation. cronジョブを確認すると、 MySQLデータベースを最適化できるユーティリティを使用して作成さmysqlcheckクライアントはMySQLがインストールされています。 mysqlcheck client can checks, repairs, optimizes, and analyzes tables in MySQL database. mysqlcheckクライアントをチェック、修復、最適化、およびMySQLデータベースのテーブルに分析しています。

To create a new cron job, login to the server as root or any other user, and then edit the crontab file (in most operating system, crontab -e will open crontab file in default text editor) to add in the following line of text.新しいcronジョブを作成するには、 rootとしてログインするには、サーバーまたは他のユーザーと入力し、編集してcrontabファイル(ほとんどのオペレーティングシステムでは、 crontab - eでは、デフォルトのテキストエディタで開いてcrontabファイル)を追加するには、次の行のテキストです。 For users using cPanel, click on “Cron job” where you can set up crontab at daily, hourly and other interval.ご利用の皆様へcpanelを使用して、をクリックして" cronジョブ"どこのcrontabをセットアップすることができます。毎日、 1時間およびその他の間隔です。 Experience webmasters can also set up a crontab file in rc.hourly or rc.daily or other cron directory.ウェブマスターの経験を設定することもできます。 crontabファイルにrc.hourlyまたはrc.dailyまたはその他のcronのディレクトリにコピーします。 Note that if you login as a MySQL or normal user with no access privileges to all database, it’s not possible to optimize all databases, unless user ID and password for root is specified as in example below.に注意している場合は通常のユーザとしてログインし、 mysqlまたはすべてのデータベースにアクセス権限がないことはできませんすべてのデータベースを最適化し、利用者番号とパスワードを入力しない限り、ルートは以下の例のように指定します。

0 1 * * * mysqlcheck -Aao –auto-repair -u root -p[password] > /dev/null 0 1 * * * mysqlcheck - aao -自動車修理- uルート- p [パスワード] > / dev / nullに

The above statement has the syntax similar to “mysqlcheck [options] –all-databases”, where –all-databases parameter is the default action is no databases is specified thus can be omitted.上記の声明には、構文のように" mysqlcheck [オプション] -すべてのデータベース" 、ここですべてのデータベースのパラメータは、デフォルトのアクションはないのデータベースを指定することができるので省略している。 The command will run mysqlcheck client to automatically analyze and optimize all databases at 1 am everyday.このコマンドが実行さmysqlcheckクライアントを自動的に分析し、午前1時に日常のすべてのデータベースを最適化します。 Note that there is not space between -p and your password for root.に注意して間にスペースがない- pおよびルートのパスワードをしています。 You can change the running time to your preference, and also change the options for mysqlcheck command.上映時間を変更することができます好みに合わせて選択し、 mysqlcheckのオプションを変更してもコマンドを実行します。 If you just want to check and optimize certain databases or certain tables without the database, use the following syntax:をチェックするだけなら、特定のデータベースや、特定のテーブルの最適化をせず、データベースは、以下の構文:

mysqlcheck [options] db_name [tables] mysqlcheck [オプション] db_name [テーブル]
mysqlcheck [options] –databases DB1 [DB2 DB3...] mysqlcheck [オプション] -データベースdb1 [ DB2のdb3とは同時に使えません... ]

You may want to remove –auto-repair switch from the above command, as a table repair operation might cause data loss under some circumstances the operation due to causes include but are not limited to filesystem errors.することができます-自動車修理スイッチを削除するより、上記のコマンドで、テーブルの修復処理として、データの損失を引き起こすかもしれない状況下での操作のためにいくつかの原因が含まれていない限定されるファイルシステムエラーが発生します。 For those who has changed the character set and collation of MySQL databases may also need to use –default-character-set option. whoには、これらのキャラクタセットと照合順序を変更してMySQLのデータベースを使用することも必要なデフォルトの文字セットのオプションを選択します。 More information on all available switches and options available can be foundより詳しい情報について利用可能なすべてのスイッチとオプションをご利用があります hereここで .です。

IMPORTANT : This is a machine translated page which is provided "as is" without warranty. 重要 :これは、機械翻訳ページで提供"現状有姿"を保証します。 Machine translation may be difficult to understand.機械翻訳を理解するのは難しいかもしれません。 Please refer toを参照してください original English articleオリジナルの英語記事索引 whenever possible.いつ可能です。

Share and contribute or get technical support and help atを共有して貢献や技術サポートとヘルプを得る My Digital Life Forums 私のデジタルライフフォーラム .です。



2 Responses to “Check and Optimize MySQL Database Automatically with Crontab/Cron” 2つの応答を"をチェックし、 MySQLデータベースの最適化を自動的にcrontabに/ cronの"

  1. Zubin zubin
    January 16th, 2008 06:40 2008年1月16日06:40
    1

    Note that -–auto-repair should have two dashesに注意して-自動車修理には2つのダッシュ

    Also, you might want to leave “> /dev/null” out for the first few runs, to see the results of the command (if you put MAILTO=me@mydomain.com at the top of the crontab, the results will get sent there).また、したいかもしれませんを残す" > / dev / nullに"するための最初の数を実行すると、検索結果を表示するには、コマンド( mailto = me@mydomain.comを置く場合の上部には、 crontabに、その結果を得る送られるが) 。

  2. Mike -マイク-
    May 6th, 2008 19:15 2008年5月6日19:15
    2

    I did not know that it was nesessary to perform a regular check for mysql.それは知りませんがnesessaryして定期的なチェックを実行するにはMySQLです。

Leave a Reply残して返信

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> これらのタグを使用することができます: <aのhref=のtitle= <abbrのtitle= <blockquote cite=""> <cite> <acronymのtitle= <b>ダウンロードの<code> <デル日時= " " >の<em> <i>て<strike> <strong> <q cite="">

Subscribe without commenting登録なしのコメント


Custom Search

New Articles新しい記事

Incoming Search Terms for the Article検索用語を受信するには

mysql check database MySQLの空のデータベース - - optimize mysql database MySQLデータベースの最適化 - - check mysql database 空MySQLデータベース - - check database mysql 空のデータベースのMySQL - - mysql check db MySQLの空dBの - - mysql database check MySQLデータベースのチェック - - mysql optimize database MySQLの最適化データベース - - optimize database データベースを最適化 - - mysqlcheck optimize mysqlcheckの最適化 - - mysql optimize all databases すべてのデータベースMySQLの最適化 - - mysql optimize command MySQLの最適化コマンド - - how to optimize mysql database MySQLデータベースを最適化する方法 - - optimize mysql table MySQLテーブルの最適化 - - mysql auto repair mysql自動修復 - - optimize mysql db MySQLのデータベースを最適化 - - mysql check tables MySQLのテーブルチェック - - mysql check MySQLの空 - - cron mysql cronのMySQLの - - check mysql db 空のMySQLデータベース - - crontab mysql crontabのMySQLの - - mysql check table MySQLのチェック表 - - mysql optimize MySQLの最適化 - - optimize mysql MySQLの最適化 - - mysql db check MySQLのdBの空 - - mysql cron MySQLのcronの - - cron checker cronのチェッカー - - mysql optimize repair MySQLの最適化修復 - - mysql optimize cron MySQLの最適化のcron - - optimize database mysql 最適化するデータベースのMySQL - - how to check mysql database MySQLデータベースを確認する方法 - - check mysql table MySQLテーブルのチェック - - optimize mysql wordpress MySQLの最適化のWordPress - - optimize mysql tables MySQLテーブルの最適化 - - mysql repair database データベースMySQLの修復 - - wordpress mysql optimize WordPressのMySQLの最適化 - - Optimize MySQL Cron MySQLの最適化のcron - - MySQL optimize db MySQLの最適化dBの - - mysql health check MySQLの健康チェック - - mysql table optimize MySQLテーブルの最適化 - - check table mysql 空テーブルMySQL - - repair mysql db MySQLのデータベースを修復 - - mysql check databases MySQLの空のデータベース - - mysqlcheck database mysqlcheckデータベース - - optimize command mysql MySQLの最適化コマンド - - mysql crontab MySQLのcrontabに - - mysql check database; MySQLの空のデータベース; - - otimizar mysql MySQLのotimizar - - optimize mysql server MySQLサーバの最適化 - - auto-repair mysql 自動車修理のMySQL - - cronjob optimize tables cronジョブを最適化するテーブル - -