Check and Optimize MySQL Database Automatically with Crontab/Cron Prüfen und Optimieren von MySQL-Datenbank automatisch mit crontab / cron

MySQL is a very popular free yet powerful database system. MySQL ist ein sehr beliebtes kostenlos dennoch leistungsfähiges Datenbank-System. 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. Aber auch in großen Datenbanken, die Tabellen kann es zu fragmentiert mit Overhead durch eine kontinuierliche Aktualisierung, oder zu löschen, und legen Sie den Betrieb auf Daten in der Datenbank gespeichert. Beside, it’s also possibility that the databases may get corrupted. Außer, es ist auch möglich, dass die Datenbanken kann es beschädigt. Thus, performing health check on database and optimize MySQL server regularly is an important task. So, darstellende Gesundheits-Check-Datenbank auf und optimieren MySQL-Server regelmäßig ist eine wichtige Aufgabe.

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. Es ist ein bisschen lästig, wenn die Datenbank-Administratoren müssen sich hier anmelden um die Server-oder den Start des phpMyAdmin zur Optimierung der Datenbanken eins nach dem anderen, oder eine Tabelle von Tabelle manuell ein. Sometimes DB admin may simply forgets to do the job or set the frequency of optimization to lesser times. Manchmal DB admin vielleicht einfach vergisst, den Job zu erledigen oder die Häufigkeit der Optimierung zu mal weniger. It’s recommended that every tables in MySQL databases are checked at least once a day on a busy server. Es wird empfohlen, dass alle Tabellen in MySQL-Datenbanken sind mindestens einmal pro Tag auf einem belebten Server.

It’s possible to automate the optimization of MySQL process by using crontab function in Linux/Unix/CentOS/FreeBSD. Es ist möglich, zu automatisieren, die Optimierung von MySQL-Prozess durch den Einsatz crontab-Funktion in Linux / Unix / CentOS / FreeBSD. The cron job to check and optimize MySQL databases can be created by using mysqlcheck client utility comes MySQL installation. Der cron-Job zu überprüfen und zu optimieren MySQL-Datenbanken erstellt werden können, indem Sie mysqlcheck Client-Utility kommt MySQL-Installation. mysqlcheck client can checks, repairs, optimizes, and analyzes tables in MySQL database. mysqlcheck Client kann Kontrollen, Reparaturen, optimiert, analysiert und Tabellen in MySQL-Datenbank.

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. So erstellen Sie einen neuen Cron-Job, Login auf dem Server als root ein, oder jede andere Benutzer, und bearbeiten Sie anschließend die crontab-Datei (in den meisten Betriebssystem, crontab-e crontab öffnet sich Datei im Standard-Texteditor), um in der folgenden Zeile des Textes Werden. For users using cPanel, click on “Cron job” where you can set up crontab at daily, hourly and other interval. Für Benutzer mit cPanel, klicken Sie bitte auf "cron job", wo Sie können bis zu crontab täglich, stündlich und andere Intervall. Experience webmasters can also set up a crontab file in rc.hourly or rc.daily or other cron directory. Erleben Sie Webmaster können auch eine crontab-Datei in rc.hourly oder rc.daily oder anderen Cron-Verzeichnis. 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. Beachten Sie, dass, wenn Sie sich anmelden als MySQL oder normaler Benutzer ohne Zugriffsrechte auf alle Datenbank, ist es nicht möglich, alle Datenbanken zu optimieren, es sei denn, Benutzer-ID und das Passwort für root ist wie im Beispiel unten.

0 1 * * * mysqlcheck -Aao –auto-repair -u root -p[password] > /dev/null 0 1 * * * mysqlcheck-AAO-auto-Reparatur-u root-p [passwort]> / 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. Die obige Anweisung hat die Syntax ähnlich zu "mysqlcheck [options]-all-Datenbanken", wo-all-Datenbanken Parameter ist die Standard-Aktion ist keine Datenbank angegeben wird somit verzichtet werden kann. The command will run mysqlcheck client to automatically analyze and optimize all databases at 1 am everyday. Der Befehl wird ausgeführt mysqlcheck Client automatisch zu analysieren und zu optimieren alle Datenbanken auf 1 bin jeden Tag. Note that there is not space between -p and your password for root. Beachten Sie, dass es keine Leerzeichen zwischen-p und Ihr Passwort für den Root. You can change the running time to your preference, and also change the options for mysqlcheck command. Sie haben die Möglichkeit, die Laufzeit nach Ihren Wünschen, und auch die Optionen für mysqlcheck Befehl. If you just want to check and optimize certain databases or certain tables without the database, use the following syntax: Wenn Sie möchten nur zu prüfen und optimieren bestimmte Datenbanken oder bestimmte Tabellen, ohne die Datenbank, verwenden Sie die folgende Syntax:

mysqlcheck [options] db_name [tables] mysqlcheck [Optionen] db_name [Tabellen]
mysqlcheck [options] –databases DB1 [DB2 DB3...] mysqlcheck [options]-Datenbanken 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. Sie können entfernen wollen-auto-Reparatur-Schalter aus den oben genannten Befehl ein, wie eine Tabelle reparieren Betrieb kann zu Datenverlust führen, unter bestimmten Umständen den Betrieb aufgrund Ursachen sind aber nicht beschränkt auf Dateisystem Fehler. For those who has changed the character set and collation of MySQL databases may also need to use –default-character-set option. Für diejenigen, hat sich der Zeichensatz und die Zusammenstellung von MySQL-Datenbanken müssen unter Umständen auch zu nutzen-default-character-set-Option. More information on all available switches and options available can be found Mehr Informationen über alle zur Verfügung stehenden Schalter und die verfügbaren Optionen finden Sie here hier . Werden.

IMPORTANT : This is a machine translated page which is provided "as is" without warranty. WICHTIG: Es handelt sich um eine Maschine der Seite übersetzt wird "as is" ohne Garantie. Machine translation may be difficult to understand. Maschinelle Übersetzung ist vielleicht schwierig zu verstehen. Please refer to Bitte wenden Sie sich an original English article Original Englisch Artikel whenever possible. wann immer dies möglich ist.

Share and contribute or get technical support and help at Aktie und einen Beitrag oder erhalten technische Unterstützung und Hilfe an My Digital Life Forums Meine digitalen Lebens Foren . Werden.



2 Responses to “Check and Optimize MySQL Database Automatically with Crontab/Cron” 2 Responses to "Prüfen und Optimieren von MySQL Datenbank automatisch mit crontab / cron"

  1. Zubin
    January 16th, 2008 06:40 16. Januar 2008 06:40
    1

    Note that -–auto-repair should have two dashes Beachten Sie, dass - auto-Reparatur sollten zwei Bindestrichen

    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). Auch Sie könnten zu verlassen "> / dev / null" für die ersten paar läuft, sehen die Ergebnisse der Befehl (wenn man MAILTO = me@mydomain.com an der Spitze der crontab, die Ergebnisse erhalten gesendet dort).

  2. Mike - Mike --
    May 6th, 2008 19:15 6. Mai 2008 19:15
    2

    I did not know that it was nesessary to perform a regular check for mysql. Ich wusste nicht, dass es sich nesessary, um eine regelmäßige Überprüfung für MySQL.

Leave a Reply 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> Sie können diese Tags: <a href= title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime = ""> <em> <i> <q Cite=""> <strike> <strong>

Subscribe without commenting Abonnieren ohne zu kommentieren


Custom Search

New Articles Neue Artikel

Incoming Search Terms for the Article Eingehender Suchbegriffe für den Artikel

mysql check database MySQL-Datenbank überprüfen - -- check mysql database Check MySQL-Datenbank - -- optimize mysql database Optimierung von MySQL-Datenbank - -- check database mysql Check-Datenbank MySQL - -- mysql check db MySQL DB-Check - -- optimize database Optimierung der Datenbank - -- mysql database check MySQL-Datenbank überprüfen - -- mysqlcheck optimize mysqlcheck optimieren - -- mysql optimize all databases MySQL-Optimierung aller Datenbanken - -- mysql optimize database MySQL Datenbank optimieren - -- how to optimize mysql database wie zur Optimierung der MySQL-Datenbank - -- mysql optimize command MySQL optimieren Befehl - -- mysql check tables MySQL-Tabellen prüfen - -- mysql auto repair MySQL Auto-Reparatur - -- cron mysql Cron MySQL - -- mysql check table MySQL-Tabelle überprüfen - -- mysql optimize MySQL optimieren - -- mysql cron MySQL Cron - -- cron checker Cron-Checker - -- mysql optimize repair MySQL optimieren Reparatur - -- optimize mysql db Optimierung von MySQL DB - -- mysql db check MySQL DB-Check - -- optimize mysql table Optimierung von MySQL-Tabelle - -- check mysql db Check MySQL DB - -- mysql check MySQL-Check - -- check mysql table Check MySQL-Tabelle - -- crontab mysql crontab MySQL - -- optimize mysql wordpress MySQL optimieren WordPress - -- optimize mysql tables Optimierung von MySQL-Tabellen - -- mysql repair database MySQL-Datenbank reparieren - -- mysql optimize cron MySQL optimieren Cron - -- optimize database mysql Optimierung der Datenbank MySQL - -- check table mysql Prüftabelle MySQL - -- repair mysql db Reparatur MySQL DB - -- mysql check databases MySQL-Datenbanken prüfen - -- MySQL optimize db MySQL-DB optimieren - -- mysql table optimize MySQL-Tabellen optimieren - -- how to check mysql database wie Sie MySQL-Datenbank - -- optimize command mysql Optimierung von MySQL-Befehl - -- otimizar mysql otimizar MySQL - -- optimize mysql server Optimierung von MySQL-Server - -- optimize mysql MySQL optimieren - -- auto-repair mysql Auto-Reparatur MySQL - -- cronjob optimize tables Cronjob Tabellen optimieren - -- check database Check-Datenbank - -- optimize a database Optimieren einer Datenbank - -- wordpress mysql optimize WordPress MySQL optimieren - -- Optimize MySQL Cron Optimieren von MySQL Cron - -- mysql health check MySQL-Gesundheits-Check - -- optimizing mysql database Optimierung von MySQL-Datenbank - --