Need to split a MySQL Database.

Discussion in 'OT Technology' started by xxDriveNxx, Dec 11, 2007.

  1. xxDriveNxx

    xxDriveNxx New Member

    Joined:
    Oct 11, 2007
    Messages:
    6
    Likes Received:
    0
    Trying to get it moved to the new server, but as always, host has an import limit in MyPHPadmin, this one being only 2MB.
    Database is 20MB, 11MB compressed.

    Tried BigDump, but keep getting assorted errors.

    Seems that my only remaining option is to find a program/script that will split it into 2MB files, and upload one by one.

    Any suggestions/ideas?

    Edit: Tried google, nothing useful. Weird.
     
  2. Pork Chop Sandwiches

    Pork Chop Sandwiches Extraordinary Member

    Joined:
    Feb 25, 2005
    Messages:
    7,217
    Likes Received:
    0
    Location:
    TGP
    Damn dude, you need a new host.
     
  3. ittech

    ittech "If You're Not Part of the Solution, There's Good OT Supporter

    Joined:
    Dec 31, 2001
    Messages:
    18,998
    Likes Received:
    0
    Location:
    Sonoma, California
    can't you create a new one with the same name, stop mysql and upload your file again, set permissons and then start mysql?

    sounds like you have some sort of shitty cpanel only shared host with no shell though, right?
     
  4. xxDriveNxx

    xxDriveNxx New Member

    Joined:
    Oct 11, 2007
    Messages:
    6
    Likes Received:
    0
    Pork Chop Sandwiches- Tell me about it, but it's free. Can't complain too much. Basically unlimited bandwidth.

    ittech- Plesk. Just have hardly any permissions to do anything. I could do it manually, just wondering if there was a quicker route to getting it up.
     
  5. wizziebaldwin

    wizziebaldwin New Member

    Joined:
    Nov 30, 2007
    Messages:
    60
    Likes Received:
    0
    a possible solution is to use EXPORT function in phpMyAdmin and start exporting the tables.

    Depending upon the number of tables and the records in each table you should be able to create manageable chunks to insert into the new host.
     
  6. Peyomp

    Peyomp New Member

    Joined:
    Jan 11, 2002
    Messages:
    14,017
    Likes Received:
    0
    If you have shell access, you can mysqldump one table at a time, or by a query. That way you could take one dump of just the table structure and no data, and then get a count of rows in your bigger tables, and select 2MB chunks. 'man mysqldump' will explain this. This could be a PITA in a normalized DB though. Can you also do this in mysqldump, backup via a query?
     
  7. retorq

    retorq What up bitch??

    Joined:
    Dec 14, 2006
    Messages:
    6,061
    Likes Received:
    0
    Location:
    Mohave Desert
    You might be able to allow remote connections to your database, then you can use something like mysqladmin to connect to it. You can do your inserts from a remote machine or even from the server the database is sitting on now.
     
  8. +(ll.ll)+

    +(ll.ll)+ New Member

    Joined:
    Jan 14, 2007
    Messages:
    14,072
    Likes Received:
    0
    Can't you just restore your MySQL database via cPanel or DirectAdmin without those limits applied? Since your MySQL database is only 2MB, you can open it with Notepad or Wordpad (or other similar program), and then copy and paste it into SQL queries window in PhpMyAdmin.

    Or use BigDump.
     

Share This Page