How to Read MySQL Binary Log Files (BinLog) with mysqlbinlog कैसे mysqlbinlog के साथ MySQL द्विचर लॉग फ़ाइलें (BinLog) को पढ़ें

MySQL database server generates binary log files for every transaction to the databases, provided administrator does not disable or comment out the “log-bin” parameter in my.cny configuration file. MySQL डाटाबेस सर्वर डेटाबेस के लिए प्रत्येक लेनदेन के लिए द्विआधारी लॉग फाइल उत्पन्न करता है, बशर्ते प्रशासक या निष्क्रिय कर बाहर नहीं "प्रवेश बिन टिप्पणी है my.cny विन्यास फाइल में पैरामीटर". The binary log files are written in binary format. द्विआधारी लॉग फ़ाइलें बाइनरी स्वरूप में लिखा है. Although the binary logs, or also known as logbin are mainly used for MySQL database replication purpose, sometimes you may need to examine or read the contents of binary logs in text format, where the mysqlbinlog utility will come in handy. हालांकि द्विआधारी लॉग करता है, या यह भी logbin रूप में जाना जाता मुख्यतः MySQL डेटाबेस प्रतिकृति उद्देश्य के लिए इस्तेमाल किया हो, कभी कभी आप जांच या पाठ प्रारूप में द्विआधारी लॉग की सामग्री पढ़ जहां mysqlbinlog उपयोगिता काम में आ जाएगा ज़रूरत हो सकती है.

Binary log file, which normally has name with the format host_name-bin.xxxxxx and store in /var/lib/mysql directory, could not be opened and read straight away as it's in unreadable binary format. द्विआधारी लॉग फ़ाइल, / जो सामान्य प्रारूप host_name-bin.xxxxxx में और दुकान के साथ नाम है var / lib / mysql निर्देशिका, और नहीं खोला सीधे पढ़ने के रूप में यह अस्पष्ट द्विपदीय प्रारूप में है हो सकता है. To read the binary logs in text format, we can make use of mysqlbinlog command, which also able to readrelay log files written by a slave server in a replication setup. को पाठ प्रारूप में द्विआधारी लॉग पढ़ा, हम आदेश है, जो भी प्रवेश एक प्रतिकृति सेटअप में एक गुलाम सर्वर ने लिखा फ़ाइलें readrelay कर mysqlbinlog का उपयोग कर सकते हैं. Relay logs have the same format as binary log files. रिले लॉग द्विआधारी लॉग इन फ़ाइलों के रूप में ही स्वरूप है.

To use mysqlbinlog utility is simple, simply use the following command syntax to invoke mysqlbinlog after login in as root (else you have to specify user name and password) to shell via SSH: Mysqlbinlog उपयोगिता का उपयोग करने के लिए आसान, बस निम्न कमांड का प्रयोग है वाक्यविन्यास में प्रवेश के बाद mysqlbinlog आह्वान रूट के रूप में (और आप के लिए उपयोगकर्ता नाम और पासवर्ड निर्दिष्ट है) को ssh द्वारा खोल:

mysqlbinlog [options] log_file ...

So to read and display the contents of the binary log file named binlog.000001, use this command: तो और पढ़ने के लिए द्विआधारी प्रवेश की सामग्री प्रदर्शित फ़ाइल binlog.000001 नाम, इस कमांड का उपयोग करें:

mysqlbinlog binlog.000001

The binary log files and its data are likely to be very huge, thus making it almost impossible to read anything on screen. द्विआधारी लॉग इन फ़ाइलों और डेटा के लिए बहुत बड़ी हो सकती हैं, इस तरह यह लगभग स्क्रीन पर कुछ पढ़ने असंभव बना. However, you can pipe the output of mysqlbinlog into a file which can be open up for later browsing in text editor, by using the following command: लेकिन, आप एक फाइल हो जो बाद में पाठ संपादक में ब्राउज़िंग, निम्न कमांड का प्रयोग कर के लिए खोल सकते में mysqlbinlog के उत्पादन में पाइप कर सकते हैं:

mysqlbinlog binlog.000001 > filename.txt

To reduce the amount of data retrieved from binary logs, there are several options that can be used to limit the data that is been returned. द्विआधारी करने के लिए लॉग से प्राप्त आंकड़ों की मात्रा को कम करने, वहाँ कई विकल्पों के लिए डेटा वापस आ गया है कि सीमा इस्तेमाल किया जा सकता है. Among the useful ones are listed below: उपयोगी वालों में नीचे सूचीबद्ध हैं:

–start-datetime=datetime -शुरू DateTime DateTime =

Start reading the binary log at the first event having a timestamp equal to or later than the datetime argument. पहले कोई टाइमस्टैम्प के बराबर या बाद वाले समारोह में द्विआधारी लॉग पढ़ना शुरू DateTime तर्क से. The datetime value is relative to the local time zone on the machine where you run mysqlbinlog. DateTime मूल्य मशीन पर स्थानीय समय क्षेत्र के सापेक्ष तुम कहाँ mysqlbinlog चला है. The value should be in a format accepted for the DATETIME or TIMESTAMP data types. मूल्य एक DateTime या टाइमस्टैम्प डेटा प्रकार के लिए स्वीकार किए जाते हैं प्रारूप में होना चाहिए. For example: उदाहरण के लिए:

mysqlbinlog --start-datetime="2005-12-25 11:25:56" binlog.000001

–stop-datetime=datetime -रोकने DateTime = DateTime

Stop reading the binary log at the first event having a timestamp equal or posterior to the datetime argument. बंद करो पहले एक समान या DateTime तर्क के पीछे टाइमस्टैम्प वाले समारोह में द्विआधारी लॉग पढ़ने. This option is useful for point-in-time recovery. इस विकल्प का बिंदु के लिए उपयोगी में समय वसूली है. See the description of the –start-datetime option for information about the datetime value. -DateTime मूल्य के बारे में जानकारी के लिए शुरू DateTime विकल्प का वर्णन देखें.

–start-position=N -शुरू की स्थिति N =

Start reading the binary log at the first event having a position equal to the N argument. पहले कोई एन तर्क के बराबर होने की स्थिति समारोह में द्विआधारी लॉग पढ़ने शुरू करो. This option applies to the first log file named on the command line. इस विकल्प का पहला लॉग इन पर लागू होता है कमांड लाइन पर फ़ाइल नाम.

–stop-position=N -रोकने की स्थिति = N

Stop reading the binary log at the first event having a position equal or greater than the N argument. बंद करो पहले एक समान स्थिति या एन तर्क से अधिक होने समारोह में द्विआधारी लॉग पढ़ने. This option applies to the last log file named on the command line. इस विकल्प को पिछले लॉग इन पर लागू होता है कमांड लाइन पर फ़ाइल नाम.

For more usage information on mysqlbinlog, visit Mysqlbinlog, यात्रा के बारे में अधिक जानकारी के लिए उपयोग 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. जब भी संभव है.


2 Responses to “How to Read MySQL Binary Log Files (BinLog) with mysqlbinlog” 2 जवाब "कैसे mysqlbinlog के साथ करने के लिए MySQL द्विचर लॉग फ़ाइलें (BinLog) पढ़ें"

  1. nicolas निकोलस
    September 5th, 2009 05:04 5 सितम्बर 2009 05:04
    2 2

    don't forget (as i did) to execute mysqlbinlog with a user that has permission to read the binlog or sudo works nicely too. भूल जाते हैं जैसा कि मैंने क्या किया नहीं () के लिए एक प्रयोक्ता जो binlog या sudo पढ़ने की अनुमति है साथ mysqlbinlog निष्पादित भी अच्छी तरह से काम करता है.

  2. Pisu Pisu
    June 29th, 2008 16:33 29 जून 2008 16:33
    1 1

    This post saved my life today… when the binary log were the only way to retrieve important data get lost… thanks!! इस पोस्ट में आज मेरी जान बचाई ... जब द्विआधारी लॉग एकमात्र तरीका महत्वपूर्ण डेटा पुनः प्राप्त किया गया खो ... धन्यवाद हो!

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 binary log mysql द्विआधारी लॉग इन - -- mysqlbinlog command mysqlbinlog कमान - -- mysqlbinlog mysqlbinlog - -- binlog mysql binlog mysql - -- mysql bin log reader mysql बिन लॉग पाठक - -- reader mysql binary log पाठक mysql द्विआधारी लॉग इन - -- reading mysql-bin logs लॉग पढ़ने mysql-बिन - -- view mysql binary log देखने के mysql द्विआधारी लॉग इन - -- view mysql bin-log देखने के mysql बिन-लॉग इन करें - -- windows mysqlbinlog mysqlbinlog खिड़कियां - -- BINLOG BINLOG - -- mysql binary log view mysql द्विआधारी लॉग देखें - -- mysql transaction log view mysql लेनदेन लॉग देखें - -- binlog database upgrade binlog डेटाबेस का उन्नयन - -- how to read binary text कैसे द्विआधारी पाठ पढ़ने के लिए - -- how to read from mysql कैसे mysql से पढ़ने के लिए - -- how to read mysql binary logs कैसे mysql द्विआधारी लॉग पढ़ने के लिए - -- log mysql-bin लॉग mysql-बिन - -- mysql read bin logs mysql पढ़ें बिन लॉग - -- mysqlbinlog ubuntu examples Ubuntu उदाहरण mysqlbinlog - -- mysql reading transaction log mysql पढ़ने के लेनदेन लॉग इन - -- mysql bin logs mysql बिन लॉग - -- MySQL+reading binary logs MySQL + द्विआधारी लॉग पठन - -- mysql search binary log mysql खोज द्विआधारी लॉग इन - -- mysql read bin log file mysql पढ़ें बिन लॉग फ़ाइल - -- mysql binlog programming interface mysql binlog प्रोग्रामिंग अंतरफलक - -- mysql bin log viewer mysql बिन लॉग दर्शक - -- mysqlbinlog howto mysqlbinlog howto - -- mysql binlogs mysql binlogs - -- mysql binlog viewer mysql binlog दर्शक - -- mysqlbinlog usage mysqlbinlog उपयोग - -- mysqlbinlog error relay log mysqlbinlog त्रुटि रिले लॉग इन - -- mysql log viewer mysql लॉग दर्शक - -- mysql-bin analyze mysql-बिन विश्लेषण - -- MySQLBinlog.java+samples MySQLBinlog.java + नमूने - -- read mysql bin log to a file एक फाइल को mysql बिन लॉग पढ़ें - -- read mysql binary log पढ़ें mysql द्विआधारी लॉग इन - -- view mysql log देखने के mysql लॉग इन - -- viewing mysql binary logs mysql द्विआधारी लॉग देखने - -- binlogs howto binlogs howto - -- examine mysql-bin mysql-बिन जांच - -- hot to read mysql error log mysql त्रुटि के लिए लॉग इन करें गर्म - -- How would you get a listing of all binary log files? आप सभी द्विआधारी लॉग इन फ़ाइलों की एक सूची कैसे मिलेगा? - -- how to read binlog कैसे binlog पढ़ने के लिए - -- how to read mysql query log कैसे mysql क्वेरी से पढ़ने के लिए लॉग इन करें - -- how to read from msql कैसे msql से पढ़ने के लिए - -- mssql read bin file mssql पढ़ें बिन फ़ाइल - -- mysql logfile command mysql logfile कमान - -- mysql-bin files फ़ाइलें mysql-बिन - -- mysql binary log viewer mysql द्विआधारी लॉग दर्शक - --