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. बगल में, यह भी संभावना है कि डेटाबेस भ्रष्ट हो सकता है. Thus, performing health check on database and optimize MySQL server regularly is an important task. इस प्रकार, डेटाबेस पर प्रदर्शन के स्वास्थ्य की जाँच करें और अनुकूलन MySQL सर्वर नियमित रूप से एक महत्वपूर्ण कार्य है.

It's a 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 शुरू करने के लिए एक या एक से मेज के डेटाबेस का अनुकूलन एक टेबल से मैन्युअल रूप से है परेशानी है. 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. यह लिनक्स में crontab समारोह का प्रयोग / Unix द्वारा MySQL प्रक्रिया का अनुकूलन स्वचालित संभव है / CentOS / FreeBSD. The cron job to check and optimize MySQL databases can be created by using mysqlcheck client utility comes MySQL installation. क्रॉन जॉब और जाँच करने के लिए 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. एक नया क्रॉन जॉब, जड़ या किसी अन्य उपयोगकर्ता के रूप में सर्वर से प्रवेश बनाते हैं, तो और crontab फ़ाइल संपादित करें (सबसे ऑपरेटिंग सिस्टम, crontab में ई पाठ संपादक में डिफ़ॉल्ट crontab फ़ाइल खुलेगी) के पाठ के निम्नलिखित पंक्ति में जोड़ें . For users using cPanel, click on “Cron job” where you can set up crontab at daily, hourly and other interval. उपयोगकर्ताओं के लिए "पर क्रॉन जॉब cPanel प्रयोग क्लिक करें," तुम, दैनिक प्रति घंटा और अन्य अंतराल में कहाँ स्थापित crontab कर सकते हैं. Experience webmasters can also set up a crontab file in rc.hourly or rc.daily or other cron directory. अनुभव वेबमास्टर्स भी rc.hourly या rc.daily या अन्य cron निर्देशिका में एक crontab फ़ाइल सेट कर सकते हैं. 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 / बातिल *

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. ध्यान दें कि वहाँ के बीच अंतरिक्ष पी और जड़ के लिए अपना पासवर्ड नहीं है. 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. के लिए जो चरित्र सेट और MySQL डाटाबेस का मिलान भी प्रयोग डिफ़ॉल्ट-चरित्र विकल्प सेट करना पड़ सकता है बदल गया है. More information on all available switches and options available can be found सभी उपलब्ध स्विच और उपलब्ध विकल्पों पर अधिक जानकारी पाया जा सकता है here यहां . .

IMPORTANT : The page is machine translated and provided "as is" without warranty. महत्वपूर्ण: पृष्ठ की मशीन है और अनुवाद प्रदान "के रूप में वारंटी के बिना है." Machine translation may be difficult to understand. मशीन अनुवाद मुश्किल से समझ सकते हो. Please refer to कृपया उल्लेख करने original English article मूल अंग्रेजी लेख whenever possible. जब भी संभव है.


6 Responses to “Check and Optimize MySQL Database Automatically with Crontab/Cron” 6 उत्तर के लिए "की जाँच करें और अनुकूलन MySQL Crontab के साथ स्वत: डाटाबेस / Cron"

  1. Johny जॉनी
    August 13th, 2009 22:33 13 अगस्त 2009 22:33
    6 6

    Thanks!!, I'll test it on my testing server. धन्यवाद!!, मैं अपने परीक्षण सर्वर पर परीक्षण करेंगे.

  2. Lowongan Kerja Lowongan Kerja
    April 2nd, 2009 09:41 2 अप्रैल 2009 09:41
    5 5

    I'ma newby on managing MySQL. MySQL प्रबंध पर I'ma newby.
    I want to ask you, how to to make sure if the Cron is working? मैं आप से पूछना, कैसे यह सुनिश्चित करने के लिए यदि Cron काम कर रहा है करना चाहते हैं?

    Thanks धन्यवाद

  3. tbartels tbartels
    November 16th, 2008 12:48 16, 2008 12:48 नवम्बर
    4 4

    along the lines of what Zubin is suggesting you can use the –silent(-s) switch as well, so you only get output if there is an error, something like क्या Zubin सुझाव है आप चुप-उपयोग कर सकते हैं की तर्ज साथ (-s) के रूप में अच्छी तरह से बंद है, तो आप ही उत्पादन हो अगर वहाँ एक त्रुटि है, कुछ की तरह है

    MAILTO=email@domain.com MAILTO email@domain.com =
    0 1 * * * mysqlcheck -Aaos -uroot -ppassword 0 1 * * mysqlcheck-Aaos-uroot-ppassword *

    this way you will only get an email if there is an error इस तरह आप केवल एक ईमेल प्राप्त होगा अगर वहाँ एक त्रुटि है

  4. php-trivandrum php-त्रिवेन्द्रम
    September 20th, 2008 18:34 20, 2008 18:34 सितम्बर
    3 3

    Sure mysql does need frequent tunning, and also I have seen a lot of the servers running in the default configuration. यकीन है कि mysql अक्सर tunning की जरूरत है, और मैं भी डिफ़ॉल्ट कॉन्फ़िगरेशन में चल रहे सर्वर का एक बहुत कुछ देखा है. which happens to be a very modest one. जो एक बहुत विनम्र होना होता है. If you have access to the mysql configuration file, there are some values that can make your server breathe more often. यदि आप mysql विन्यास फाइल के लिए उपयोग किया है, वहाँ कुछ मूल्यों है कि आपका सर्वर अधिक बार साँस कर सकते हैं. And make your visitors more happy. और अपने दर्शकों को खुश करने के और अधिक.

  5. Mike - माइक --
    May 6th, 2008 19:15 6 मई 2008 19:15
    2 2

    I did not know that it was nesessary to perform a regular check for mysql. मुझे नहीं पता था कि वह mysql के लिए एक नियमित जांच करने nesessary था.

  6. Zubin Zubin
    January 16th, 2008 06:40 16, 2008 06:40 जनवरी
    1 1

    Note that -–auto-repair should have two dashes ध्यान दें कि - ऑटो मरम्मत दो डैश चाहिए

    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 / बातिल" से पहले कुछ रन के लिए चाहते हैं, को कमान के परिणाम देख सकते हैं (यदि आप crontab के शीर्ष पर MAILTO me@mydomain.com = डाल, परिणाम प्राप्त करेंगे वहाँ भेजा गया).

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=""> <acronym कर सकते हैं <blockquote title=""> <b> cite=""> <cite> <code> <डेल DateTime = ""> <em> <i> <q cite=""> <strike> <strong>

Subscribe to comments feature has been disabled. टिप्पणी की सुविधा है विकलांग गया है की सदस्यता लें. To receive notification of latest comments posted, subscribe to सदस्यता के लिए नई टिप्पणियों की सूचना प्राप्त पोस्ट किया है, My Digital Life Comments RSS feed मेरे डिजिटल जीवन टिप्पणियाँ आरएसएस फ़ीड or या register to receive रजिस्टर प्राप्त करने के लिए new comments in daily email digest. दैनिक ईमेल में नई टिप्पणियाँ डाइजेस्ट.
Custom Search

New Articles नए लेख

Incoming Search Terms for the Article के लिए खोजें शर्तें आने अनुच्छेद

mysql check database mysql जांच डेटाबेस - -- check mysql database mysql डेटाबेस की जांच - -- cron mysql cron mysql - -- mysql check databases mysql जांच डेटाबेस - -- mysql autorepair mysql autorepair - -- optimize mysql database mysql डेटाबेस का अनुकूलन - -- check table mysql जांच तालिका mysql - -- check process mysql जांच प्रक्रिया mysql - -- check database mysql जांच डाटाबेस mysql - -- cron mysql cron mysql - -- crontab mysql crontab mysql - -- crontab + query mysql crontab + क्वेरी mysql - -- how to check status of all mysql tables सब कैसे mysql टेबल की स्थिति की जांच करने के लिए - -- how to check all mysql table सब कैसे mysql तालिका की जांच करने के लिए - -- mysql check databse mysql जांच databse - -- mysql cron job mysql example mysql क्रॉन जॉब mysql उदाहरण - -- mysql check mysql की जांच - -- mysql optimize db mysql DB अनुकूलन - -- mysql check database mysql जांच डेटाबेस - -- mysql optimize database mysql डेटाबेस का अनुकूलन - -- mysql optimize tables mysql तालिका अनुकूलित - -- mysql password in crontab crontab में mysql पासवर्ड - -- optimize mysql database cron mysql डेटाबेस cron अनुकूलन - -- Chceck mysql database Chceck mysql डेटाबेस - -- health check mysql स्वास्थ्य जांच mysql - -- how to optimize mysql tables कैसे mysql तालिका अनुकूलित करने के लिए - -- mysqlcheck database mysqlcheck डेटाबेस - -- mysql optimize databases; mysql डेटाबेस का अनुकूलन; - --