How to Read MySQL Binary Log Files (BinLog) with mysqlbinlog كيف تقرأ ثنائي الخلية ملفات الدخول (binlog) مع mysqlbinlog

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. الخلية يولد ثنائي خادم قاعدة البيانات عن كل ملفات الدخول إلى قواعد البيانات والمعاملات ، وقدمت مدير البرنامج لا تعطيل أو تعليق من اصل "دخول - بن" 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 وهي تستخدم أساسا لقاعدة بيانات الخلية تكرار الغرض ، وفي بعض الاحيان قد تحتاج الى دراسة أو قراءة محتويات سجلات ثنائي في شكل النص ، حيث 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 وتخزينها فى / فار / ليب / الخلية دليل ، ولا يمكن قراءة وفتح على الفور كما انه شكل ثنائي في قراءتها. 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. للاطلاع على سجلات ثنائي في شكل النص ، يمكننا الاستفادة من mysqlbinlog القيادة ، والتي تمكنت ايضا من readrelay ملفات الدخول مكتوبة من قبل خادم الرقيق في تكرار الاعداد. 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 … mysqlbinlog [خيارات] 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 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 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 mysqlbinlog -- بداية - 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 - بدء الموقف ن =

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 - وقف موقف - ن =

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 : 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 بلدي الرقميه الحياة المنتديات .



One Response to “How to Read MySQL Binary Log Files (BinLog) with mysqlbinlog” رد واحد على "كيفية قراءة ملفات الدخول ثنائي الخلية (binlog) مع mysqlbinlog"

  1. Pisu
    June 29th, 2008 16:33 يونيو 29th ، 2008 16:33
    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> يمكنك استخدام هذه العلامات : <ahref="" title=""> <abbrtitle=""> <acronymtitle=""> <b><blockquotecite=""> <cite><code><دل datetime = ""> <em><i><qCite=""> <strike><strong>

Subscribe without commenting اشترك بدون تعليق


Custom Search

New Articles المواد الجديدة

Incoming Search Terms for the Article الوافدة من حيث البحث عن المادة

mysqlbinlog mysqlbinlog - -- BINLOG Binlog - -- mysql binary log سجل ثنائي الخلية - -- mysql logs الخلية سجلات - -- mysql binlogs الخلية binlogs - -- read mysql logs اقرأ الخلية سجلات - -- read mysql log أقرأ سجل الخلية - -- mysql log reader الخلية سجل للقارئ - -- mysql log files الخلية ملفات الدخول - -- mysql binary logs ثنائي الخلية سجلات - -- mysql log file الخلية ملف الدخول - -- how to read mysql log كيف تقرأ الخلية سجل - -- mysql read bin log الخلية بن لقراءة سجل - -- mysql log read أقرأ سجل الخلية - -- reading mysql logs قراءة سجلات الخلية - -- mysql binary log reader سجل ثنائي الخلية القارئ - -- mysql binlog format شكل الخلية binlog - -- mysql binlog الخلية binlog - -- mysql bin log reader سجل الخلية بن قارئ - -- binlog mysql binlog الخلية - -- mysql binlog reader الخلية binlog القارئ - -- mysqlbinlog example مثلا mysqlbinlog - -- mysql read log أقرأ سجل الخلية - -- read mysql bin log أقرأ سجل بن الخلية - -- binary log سجل ثنائي - -- read binlog اقرأ binlog - -- mysql binary log files ثنائي الخلية ملفات الدخول - -- mysql binary logging ثنائي الخلية قطع الاشجار - -- mysql log format سجل شكل الخلية - -- mysqlbinlog usage mysqlbinlog الاستخدام - -- mysql bin log بن لدخول الخلية - -- mysql binary log format سجل شكل ثنائي الخلية - -- mysql bin log export سجل الخلية بن التصدير - -- binlogs in mysql binlogs في الخلية - -- mysql binary ثنائي الخلية - -- how to read mysql bin log كيف تقرأ الخلية بن تسجيل الدخول - -- mysql logging الخلية قطع الاشجار - -- mysql binary log location سجل ثنائي الخلية الموقع - -- mysql log files windows الخلية ملفات الدخول ويندوز - -- reading mysql bin logs القراءة الخلية بن سجلات - -- mysql read logs الخلية قراءة سجلات - -- mysqlbinlog mysqlbinlog - -- tool read mysql binlog file اداة قراءة ملف الخلية binlog - -- mysqlbinlog windows mysqlbinlog ويندوز - -- logs mysql سجلات الخلية - -- change binlog position تغيير الموقف binlog - -- mysql bin الخلية بن - -- mysql bin read بن لقراءة الخلية - -- windows mysql binary logs commands ثنائي الخلية ويندوز سجلات الاوامر - -- binlogs mysql binlogs الخلية - --