Unlimited $1.99 domain names - We use goDaddy غير محدود أسماء النطاقات 1.99 دولار -- ونحن نستخدم (GoDaddy.com)
Powered by MaxBlogPress مدعوم من MaxBlogPress

كيفية تصدير واستيراد كبيرة للغاية ماي. س. ك قواعد البيانات | JTPRATT 'sالتدوين الأخطاء
JTPratt 'sأخطاء المدونات





Home المنزل » How to export and import very large mySQL databases »كيف لتصدير واستيراد كبيرة للغاية ماي. س. ك قواعد البيانات



Posted in: نشر في :

بلوق بين الإعداد فئة الصورةالمدونات بين أخطاء فئة الصورةدروبال فئة الصورةشبكة الإنترنت تستضيف فئة الصورةووردبرس] فئة الصورة
8,696 views 8.696 آراء


Please note: This page was originally written in English. الرجاء ملاحظة : هذه الصفحة كان أصلا مكتوب باللغة الانكليزية.

The original post can be viewed الأصلي بعد ويمكن النظر إلى here هنا .

Please note: This page was originally written in English.

The text has been translated using an online service such as Google or Babelfish.

The original post can be viewed here.


I had a very large web site (30,000+ pages) that I wanted to move from one web host to another. كان لدي موقع كبير جدا (30000 + صفحة) التي أردت الانتقال من خدمة استضافة المواقع على الشبكة إلى أخرى. Normally I would use phpMyAdmin to export tables or the entire database. وأود أن عادة استخدام phpMyAdmin لتصدير الجداول أو قاعدة البيانات بأكملها. This mySQL database was of course too large for that and phpMyAdmin would timeout trying to export, even if I exported only one table at a time (one table had 1.5 million records). ماي. س. ك قاعدة البيانات هذه كانت كبيرة جدا بالطبع لأن phpMyAdmin وسوف تحاول تصدير وقتا ، حتى لو كنت لا تصدر إلا طاولة واحدة في وقت (طاولة واحدة وكان 1.5 مليون السجلات). It’s very easy to quickly export and import very, very large mySQL databases with even hundreds of thousands of records. ومن السهل جدا على الصادرات والواردات بسرعة كبيرة جدا مع قواعد بيانات ماي. س. ك حتى مئات الآلاف من السجلات.

To accomplish this we can’t do it via web page tools or methods. لإنجاز ذلك أننا لا نستطيع القيام بذلك عن طريق صفحة الويب أدوات أو أساليب. So, we have to use the command line in UNIX. لذا ، يجب استخدام سطر الأوامر في يونيكس. This will require a telnet (preferably secure telnet) account and a basic understanding on simple UNIX commands. وهذا يتطلب التلنت (ويفضل تأمين التلنت) حساب وفهم أساسي على قيادة يونيكس بسيطة. You will also enough disk space free to extract your database. يمكنك أيضا مساحة كافية على القرص الحرة لاستخلاص قاعدة البيانات الخاصة بك. If you don’t have telnet access to your web site, you can always submit a support ticket telling them what to do based on these instructions. إذا لم يكن لديك التلنت الوصول إلى موقع الويب الخاص بك ، يمكنك دائما أن يقدم الدعم تذكرة تقول لهم ما يجب عمله على أساس هذه التعليمات. You will need to know in advance your database name, your database username and password, and whether or not your server is ‘localhost’ or a server name (and what it is). ستحتاج إلى معرفة مسبقا في قاعدة البيانات الخاصة بك الاسم ، قاعدة البيانات اسم المستخدم وكلمة المرور ، أو لا وإذا كان الخادم الخاص بك هو 'localhost' أو اسم الخادم (وما هو عليه). This information is normally already entered in your site’s database config or settings file. وهذه المعلومات عادة بالفعل دخلت في موقعك في قاعدة بيانات التكوين أو إعدادات ملف. If you are using Wordpress it’s in your /wp-config.php file in the root of your site, if you’re using Drupal it’s stored in your /sites/default/settings.php file. إذا كنت تستخدم وورد أنه في حسابك / الفسفور الابيض - config.php الملف في الجذر من موقعك ، إذا كنت تستخدم دروبال لقد تم تخزينه في حسابك / مواقع / التقصير / settings.php الملف.

Here are the instructions to export your mySQL database into one file on the UNIX command line: هنا هي تعليمات لتصدير ماي. س. ك قاعدة البيانات الخاصة بك في ملف واحد على يونيكس سطر الأوامر :

  • login to your web site using telnet تسجيل الدخول إلى موقع الويب الخاص بك باستخدام التلنت
  • navigate to the directory where you want to store your extracted database file انتقل إلى الدليل حيث تريد تخزين ملف قاعدة البيانات الخاصة بك انتزعت
  • run the following on the command line: البعيد التالية على سطر الأوامر :
    mysqldump -a -u USERNAME -p DATABASE > FILENAME.mysql mysqldump - - ش أ ع بين اسم المستخدم قاعدة البيانات> FILENAME.mysql
  • check the size of your file (command: ls -al) التحقق من حجم الملف (القيادة : هل سوريا)
  • gzip your file to make the download faster using the command: gzip FILENAME.mysql gzip ملفك لجعل التحميل أسرع باستخدام القيادة : gzip FILENAME.mysql
  • download your file in ftp to your local pc to upload and import into your new database تحميل الملف الخاص بك في بروتوكول نقل الملفات إلى الكمبيوتر المحلي الخاص بك إلى تحميل واستيراد إلى قاعدة البيانات الجديدة الخاصة بك

Again, if you don’t have telnet access you can probably submit a ticket at your web host and they will extract the file for you so you can download it. مرة أخرى ، إذا لم يكن لديك يمكنك الوصول التلنت ربما يقدم تذكرة في استضافة الويب الخاص بك وسوف استخراج ملف لك حتى تتمكن من التحميل. Once downloaded you need to upload the file to your new web host so you can import it into a fresh database. مرة واحدة تم تحميل ما عليك تحميل الملف الجديد الخاص بك لاستضافة المواقع على الشبكة ، بحيث يمكنك استيرادها إلى قاعدة بيانات جديدة. First, I want to make you aware of a PHP script called أولا ، أود أن تجعلك تدرك من سيناريو ودعا PHP Big Dump كبير قلابة that does a ’staggered import’ of mysql files into a new database. أن لا أ 'تعثر استيراد' ماي. س. ك من الملفات إلى قاعدة بيانات جديدة. Even though it’s staggered (importing in chunks) it has it’s limits. رغم انه تعثر في (المستوردة في أجزاء) انها انها حدود. I have successfully used it many times on databases under 50MB. لقد استخدمت بنجاح مرات عديدة على قواعد البيانات في إطار 50MB. It has also failed miserably for me on a 191MB database. كما أنها فشلت فشلا ذريعا بالنسبة لي على 191MB قاعدة البيانات. If your database is too big to import using phpMyAdmin but under 50MB - give it a try first. لو كان لديك قاعدة بيانات كبيرة جدا لاستيراد باستخدام phpMyAdmin ولكن تحت 50MB -- محاولة إعطائها الأولى. Otherwise you’ll have to import on the command. وإلا سيكون لديك لاستيراد على القيادة. If you use Big Dump you just enter your mysql server settings into the file itself, and I have had the best results uploading the mysql file to the server (same dir you place bigdump.php in) and hardcode the filename into the file before trying the import. إذا كنت تستخدم كبير قلابة لكم فقط أدخل ماي. س. ك الخادم إلى إعدادات الملف نفسه ، ولقد كان أفضل النتائج ماي. س. ك تحميل ملف إلى خادم (دير نفس مكان لكم في bigdump.php) وhardcode اسم الملف إلى الملف قبل محاولة استيراد.

Now, if your file is >50MB or bigdump.php doesn’t work - I’m going to show you how to do a manual import of your mysql file: الآن ، إذا كان الملف هو> 50MB أو bigdump.php لا يعمل -- انا سوف تظهر لك كيفية القيام دليل استيراد ملف ماي. س. ك الخاص بك :

  • upload your mysql file to your new web site ماي. س. ك تحميل الملف الخاص بك إلى موقع جديد على الشبكة العالمية
  • create a new blank database using myPHPAdmin إنشاء قاعدة بيانات جديدة فارغة باستخدام myPHPAdmin
  • note your database username and password, and your mysql servername علما قاعدة البيانات اسم المستخدم وكلمة المرور ، وماي. س. ك الخادم الخاص بك
  • unzip your database file with this command: gzip -d FILENAME.mysql unzip ملف قاعدة البيانات الخاصة بك مع هذه القيادة : gzip - د FILENAME.mysql
  • run the following on the command line to import: البعيد التالية على سطر الأوامر لاستيراد :
    mysql -u USERNAME -p DATABASE < FILENAME.mysql ماي. س. ك - - ع ش اسم المستخدم قاعدة البيانات <FILENAME.mysql
  • check your database in myPHPAdmin to make sure all the tables imported properly فحص قاعدة البيانات الخاصة بك في myPHPAdmin للتأكد من جميع الجداول المستوردة على النحو الصحيح

That’s it! هذا كل شيء! You’ve now learned how to successfully export and import large mySQL databases when myPHPAdmin or other tools won’t work! لقد علمت الآن كيفية التصدير والاستيراد بنجاح كبير عندما myPHPAdmin ماي. س. ك قواعد البيانات أو غيرها من أدوات العمل لن! Again, if you don’t have telnet access, you can always ask your (new) web host to import the file for you. مرة أخرى ، إذا لم يكن لديك الوصول التلنت ، يمكنك دائما أن أطلب منكم (جديد) خدمة استضافة المواقع على الشبكة لاستيراد الملف للكم. I did when I migrated from a host I used for 9 years to goDaddy. قلت عندما كنت هاجرت من مجموعة وكنت انتظر لمدة 9 سنوات (GoDaddy.com). They don’t offer telnet access, so I uploaded the 191MB mysql file and gave them a call to submit a ticket. كما أنها لا تقدم التلنت الوصول ، لذلك بتحميل ملف 191MB ماي. س. ك ، وقدم لهم دعوة لتقديم التذاكر. In less than 2 hours the import was done and I was very happy! في أقل من 2 في ساعة استيراد حدث وكنت في غاية السعادة!

I’ve had a lot of people ask my why I use goDaddy, and I have to tell you…I have hosted with dozens of companies. لقد كان الكثير من الناس أنا أسأل لماذا استخدام (GoDaddy.com) ، ولقد لاقول لكم... لقد استضافت مع عشرات من الشركات. I actually setup a small account with goDaddy 6 months ago just to try it out (it was only $3.99 per month). أنا فعلا الإعداد صغيرة حساب مع GoDaddy.com) قبل 6 أشهر فقط لأنها محاولة من أصل (كان 3.99 دولار فقط في الشهر). Now, 6 months later I’ve moved everything to them. الآن ، 6 أشهر في وقت لاحق لقد انتقلت كل شيء لهم. All of my domain registrations, and all of my sites are completely hosted with goDaddy as of today (that big web site was the last one!). كل من نطاقي التسجيلات ، وجميع المواقع من بلادي تماما مع GoDaddy.com) استضافت اعتبارا من اليوم (كبير أن الموقع كان آخر واحد!). I was paying $29.99 per month for a professional webmaster account. الأول هو دفع 29.99 دولار شهريا لحساب المهنية المسؤول عن الموقع. I get the exact same thing (and more) with goDaddy for $14.99 per month. أحصل على بالضبط نفس الشيء (وأكثر) مع (GoDaddy.com) 14.99 دولار للشهريا. They have deals all the time where I pickup new domains for $1.99, and they had a special just today (when I called about the database import) where in July all web hosting was 25% off. وقد يتناول كل الوقت حيث كنت بيك اب مجالات جديدة لل1.99 دولار ، وخاصة أنها اليوم فقط (عندما دعوت إلى قاعدة بيانات عن الواردات) في تموز / يوليو حيث كل استضافة المواقع على شبكة الإنترنت وكان 25 ٪. It’s not just 25% off for new customers - it’s 25% off for ALL customers, whether you upgrade or just want to pay ahead. انها ليست فقط 25 ٪ لعملاء جدد -- ان 25 ٪ لجميع العملاء ، ما إذا كنت تريد رفع مستوى أو فقط على الدفع قدما. So I paid up a few months in advance to save even more money. حتى أنا دفعت حتى بضعة أشهر مقدما حتى لانقاذ المزيد من المال. That’s my shameless self-promotion for the day - use the host I use: وهذا قراري المخزي الذاتي تعزيز لهذا اليوم -- استخدام المضيف استخدام الأول : www.GoDaddy.com

*UPDATE* * تحديث *

I almost forgot to add why this was a ‘blogging mistake’!  I was going to migrate all of my web sites to goDaddy last month.  I setup a new account a moved all but 2 or 3 sites - mainly because I couldn’t figure out how to get those huge databases off my old server and into my goDaddy account.  Because I couldn’t figure it out my monthly hosting renewal came up, and I ended up paying for another month.  Since I had a dedicated server (that I was grossly under utilizing), that blogging mistake ended up costing me $214!!  Then I finally did a quick google search for “export large mysql database” and figured it out in an hour.  My mistake was not doing enough research to fix the problem - it’s not like I was tackling something others hadn’t been through (and documented) before.  Google is your friend - always search for solutions to your problems! أنا تقريبا نسيت أن أضيف إلى هذا السبب كان 'المدونات خطأ'! ألف ، كنت ذاهبا إلى الهجرة من بلدي جميع المواقع على شبكة الإنترنت لmonth.à (GoDaddy.com) الماضي ، وهو الأول الإعداد حساب جديد وهو تحرك ولكن جميع المواقع أو 2 أو 3 -- أساسا لأنني لم أستطع أن أعرف كيفية الحصول على تلك قواعد بيانات ضخمة قبالة بلادي القديمة والخادم (GoDaddy.com) account.à إلى بلدي ، لأنني لم أستطع أن أصل بلدي الشهرية استضافة جاء تجديد ، وانتهى بي الأمر دفع لمدة شهر آخر. ألف ، وبما أنني قد مخصصة الخادم (ان كنت تستخدم تحت صارخ) ، أن المدونات خطأ انتهى يكلف 214 دولار لي!! ألف ، ثم أخيرا فعل سريع جوجل للبحث عن "تصدير قاعدة بيانات كبيرة ماي. س. ك" وعرف هذا في hour.à ، وبلدي هو الخطأ بعدم بذل ما يكفي من البحوث لتحديد المشكلة -- الامر ليس كما لو كنت التعامل مع الآخرين شيئا لم يكن من خلال (وثقت) before.à ، جوجل صديقك -- دائما البحث لإيجاد حلول للمشاكل الخاصة بك!


8 Responses to “How to export and import very large mySQL databases” 8 ردود على "كيفية تصدير واستيراد كبيرة جدا قواعد بيانات ماي. س. ك"

  1. nouffer.info.technology » Blog Archive » How to Import Large MySQL Data Files nouffer.info.technology »أرشيف المدونة» كيف لاستيراد ملفات البيانات الكبيرة ماي. س. ك Has the following to say... وقد التالي ليقول...

    [...] How to export and import very large mySQL databases [...] (...)كيف لتصدير واستيراد كبيرة جدا قواعد بيانات ماي. س. ك...

  2. Nada Insyirah » How to Import Large MySQL Data Files ندى Insyirah »كيفية استيراد ملفات البيانات الكبيرة ماي. س. ك Has the following to say... وقد التالي ليقول...

    [...] How to export and import very large mySQL databases [...] (...)كيف لتصدير واستيراد كبيرة جدا قواعد بيانات ماي. س. ك...

  3. konijnenhokken konijnenhokken Has the following to say... وقد التالي ليقول...

    thanks a lot for this post, i am using it right now to transfer over my dbases (190mb+) to my new server! الشكر الكثير لهذا المنصب ، وأنا الآن باستخدام حق لأنه نقل أكثر من بلدي dbases (190mb +) لبلادي الخادم الجديد!

    bookmarked for pleasure! إشارة مرجعية للمتعة! tjanks!

  4. Andrés Mochi Andràق © Mochi Has the following to say... وقد التالي ليقول...

    = Good info mate. معلومات جيدة ماتي. I needed that ^^ الأول أن هناك حاجة ^ ^

    Thanks a lot!!! وبفضل الكثير!

  5. fedmich fedmich Has the following to say... وقد التالي ليقول...

    I’m encountering same problems now.. انا تواجه نفس المشاكل الآن.. Im importing a 2Million records of lyrics, artis, etc. int a website and the SQL Dump is more than 400MB of dump file. ايم 2Million استيراد السجلات من كلمات ، artis ، وما إلى كثافة العمليات موقع على شبكة الإنترنت ومزود قلابة هو أكثر من 400MB من ملف التفريغ. I’m splitting and uploading them at the moment, but Im sure there’sa better way of doing this. أنا تقسيم وتحميل لهم في لحظة ، ولكن ايم متأكد هناك طريقة أفضل للقيام بذلك. Any software (I’ll buy it) there or PHP scripts. أي البرمجيات (سأتناول شراء) ، أو هناك مخطوطات PHP. THanks in advance ويرجع الفضل في ذلك مقدما

    fedmich’s last blog post.. fedmich آخر بلوق وظيفة.. Fedmich Computer Shop on Manila Times closed Fedmich متجر كمبيوتر على مانيلا تايمز مغلقة

  6. GeoSathi GeoSathi Has the following to say... وقد التالي ليقول...

    It is a good article about the mysql database regarding to import a heavier one. ومن حسن عن المادة ماي. س. ك قاعدة بيانات بشأن استيراد أثقل واحدة.

    Excellent ممتاز

    By بواسطة

    GeoSathi
    http://www.geosathi.com

  7. Sniper4Dz Has the following to say... Sniper4Dz قام التالية ليقول...

    this is error هذا هو الخطأ

    ERROR 1231 (42000) at line 4082: Variable ’sql_mode’ can’t be set to the value of ‘Null’ خطأ 1231 (42000) في خط 4082 : المتغير 'sql_mode' لا يمكن لمجموعة قيمة من 'فارغ'

  8. Prakash Has the following to say... قام براكاش التالية ليقول...

    Thanks, gr8 help for me شكرا ، gr8 مساعدة للي

Question or Comment?? السؤال أو التعليق؟؟ Spill it Now... انسكاب الآن...

القفز للفرح أكثر من التعليقات!

We Reward Comments! نحن مكافأة تعليقات!


We dofollow links, and get your latest blog post as a byline under every new comment from the "CommentLuv" plugin! نحن dofollow الروابط ، وإحصل على أحدث ما بعد بلوق بوصفها الخط الثانوي تحت كل تعليق من جديدا "CommentLuv" البرنامج المساعد! Top commenters for every month are listed on every page of this site in a sidebar widget linked back to your URL! أعلى commenters كل شهر لترد على كل صفحة من هذا الموقع في الشريط الجانبي القطعة مرتبطة العودة إلى وصلتك! We would like to reward you for becoming part of our community! ونود أن مكافأة لك لتصبح جزءا من مجتمعنا! Your comment is valuable not only to us, but also all the other readers of this blog! تعليقك هو قيمة ليس فقط لنا ، بل أيضا سائر قراء هذا بلوق!


Click to add smilies to your post! انقر لإضافة الابتسامات إلى حسابك في ما بعد! == []^ = (= ((= (|=) ص= | 8= 0=) ~= 00= (= ؛ ؛=)]= ؛ ؛ ؛