Splitting MySQL Database?

Discussion in 'Web Design & Coding' started by ~bk, Nov 18, 2006.

  1. ~bk

    ~bk I Political User

    Messages:
    3,768
    Location:
    Canada
    I recently switched hosts for my website. So now I'm trying to upload MySQL database for my blog through phpMyAdmin but I can't as the upload limit is only 2MB. My file is around 5MB. I emailed the hosting company about it and this is what I got:


    Now how do I do the italicized part? :p
     
  2. Shamus MacNoob

    Shamus MacNoob Moderator Political User

    Messages:
    4,199
    Location:
    L'Ile Perrot Quebec
    File Chopper
     
  3. X-Istence

    X-Istence * Political User

    Messages:
    6,498
    Location:
    USA
    Ehm, sure, chop the file into little bits, won't work though, since MySQL dumps are sensitive as to where you chop them. If you chop an INSERT in half MySQL WILL complain.

    Put the file in a folder on your webhost, then contact your webhost and tell them to run this command:

    mysql -u [your MySQL username] -p [database here] < file.sql

    Then also give them a password, and they can import the database on the server itself. If they can't do this for you, consider switching to another host.

    Bert JW Regeer
     
  4. Shamus MacNoob

    Shamus MacNoob Moderator Political User

    Messages:
    4,199
    Location:
    L'Ile Perrot Quebec
    you can chop and reassemble once it is uploaded no need to insert a half anywhere .
     
  5. LordOfLA

    LordOfLA Godlike!

    Messages:
    7,027
    Location:
    Maidenhead, Berkshire, UK
    just FTP it to the server and tell phpmyadmin to use a server based file or login via ssh and upload it to mysql that way.

    If you need an ssh enabled hosting account drop me a note.
     
  6. X-Istence

    X-Istence * Political User

    Messages:
    6,498
    Location:
    USA
    phpMyAdmin takes an upload, and immediatly tries to put it into the database, it does not store it intermediately somewhere while you upload the second half.
     
  7. ~bk

    ~bk I Political User

    Messages:
    3,768
    Location:
    Canada
    Thanks guys. I'll see what I can do. :)