1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Big Sql File

Discussion in 'MySQL' started by doonn, Feb 18, 2008.

  1. #1
    Hello ...

    i dun kno if this is riht section to ask this question.....

    i want to restore my backup.sql file...
    size. 4.8mb
    i tried to upload that via phpmyadmin.. but i got an error... something like
    fatal error.. 300 exceeded something like that ... i really dun remember wat was it ..



    so is there any suggestion how to solve that ..... ????????

    plzzzzz help .... my site is down :( .... and i really have to upload that backup


    thnxxxxx
     
    doonn, Feb 18, 2008 IP
  2. b4db0y

    b4db0y Notable Member

    Messages:
    3,523
    Likes Received:
    74
    Best Answers:
    0
    Trophy Points:
    205
    #2
    4.8 is not that big. what host are you using?
     
    b4db0y, Feb 18, 2008 IP
  3. kojakfilth

    kojakfilth Notable Member

    Messages:
    3,000
    Likes Received:
    213
    Best Answers:
    0
    Trophy Points:
    210
    #3
    If you can upload it at your phpmyadmin then try this bigdump method ozerov.de/bigdump.php
     
    kojakfilth, Feb 18, 2008 IP
  4. doonn

    doonn Active Member

    Messages:
    347
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    60
    #4
    i tried bigdump already ... but it didnt work ....
    it gives me an error ....
     
    doonn, Feb 18, 2008 IP
  5. b4db0y

    b4db0y Notable Member

    Messages:
    3,523
    Likes Received:
    74
    Best Answers:
    0
    Trophy Points:
    205
    #5
    what host do you use?
     
    b4db0y, Feb 18, 2008 IP
  6. doonn

    doonn Active Member

    Messages:
    347
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    60
    #6
    man .... its mycoolworld..
    his server was hacked recently his site is down ....
     
    doonn, Feb 18, 2008 IP
  7. b4db0y

    b4db0y Notable Member

    Messages:
    3,523
    Likes Received:
    74
    Best Answers:
    0
    Trophy Points:
    205
    #7
    hmm. try to compress the database to gzip
    "http://ftp.gnu.org/gnu/gzip/gzip-1.2.4.tar" use it
     
    b4db0y, Feb 18, 2008 IP
  8. abhishekbhatnagar

    abhishekbhatnagar Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    check if you are using redirection plugin?....make sure to empty the redirection_log table through ur phpmy admin interface.
     
    abhishekbhatnagar, Feb 18, 2008 IP
  9. doonn

    doonn Active Member

    Messages:
    347
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    60
    #9
    how do u use this ?
     
    doonn, Feb 18, 2008 IP
  10. doonn

    doonn Active Member

    Messages:
    347
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    60
    #10
    and how do u do that ...
     
    doonn, Feb 18, 2008 IP
  11. ntp

    ntp Banned

    Messages:
    221
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #11
    Depending on if the database has tables - you can do it 1 or 2 tables at a time.

    The sql dump will have the sql instructions in front of the data, so use note++ or editplus, something like that, and open the file and break the file down. Then you can import each field at a time.

    It would seem to be a time out error, but the bigdump problem is a little strange.
     
    ntp, Feb 19, 2008 IP
  12. blowingideas

    blowingideas Peon

    Messages:
    642
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #12
    hey, perhaps there's a restriction from your webhost regarding with the max size for db import.
    try to contact them, perhaps they can do it for you from the command line.
     
    blowingideas, Feb 19, 2008 IP
  13. doonn

    doonn Active Member

    Messages:
    347
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    60
    #13
    Fatal error: Maximum execution time of 300 seconds exceeded in /usr/local/cpanel/base/3rdparty/phpMyAdmin/libraries/import/sql.php on line 118

    this is the actual error ... i m still unable to upload that :((

    how do u break the file down ???

    and that .sql file is not in ENG ... its in some other lang .. i dun wat lang is that ... i m unable to read ... but its more like #### this numberz
     
    doonn, Feb 19, 2008 IP
  14. SinanCan

    SinanCan Peon

    Messages:
    132
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #14
    error :( ..
     
    SinanCan, Feb 21, 2008 IP
  15. sixx

    sixx Peon

    Messages:
    30
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #15
    Had the same problem last week with HostGator.

    Instead of waiting XX hours for support, I used a cron entry to import the db.

    1. upload the sql file onto the host
    2. make sure the db on the host is empty
    3. create a cron entry like this:
    "/usr/bin/mysql -u your_mysql_username -p your_mysql_password your_mysql_db < /path/to/the/sql/file"
    .. and set it to run in, let's say 5 minutes.
    4. after 5 minutes passed, check the db in phpmyadmin and if it's ok, then delete the cron job.

    HTH
     
    sixx, Feb 21, 2008 IP
  16. LittleJonSupportSite

    LittleJonSupportSite Peon

    Messages:
    386
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    0
    #16
    You would need to get them to up the 2MB standard limit, in php.ini and in phpmyadmin.

    You could get around this by simply using the command line interface and restoring it that way - provided you have SSH access.
     
    LittleJonSupportSite, Feb 21, 2008 IP
  17. LittleJonSupportSite

    LittleJonSupportSite Peon

    Messages:
    386
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    0
    #17
    PS: Request SSH from HostGator and they will give it to you.

    From what I have seen with this company, they are terrible form the hosting prices down to the support nothing but trouble with this company.

    I run my own web hosting company because I cannot be bothered with these guys rules and regulations.
     
    LittleJonSupportSite, Feb 21, 2008 IP
  18. sixx

    sixx Peon

    Messages:
    30
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #18
    They'll give SSH access for reseller (shared hosting) accounts ?
     
    sixx, Feb 21, 2008 IP
  19. ntp

    ntp Banned

    Messages:
    221
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #19
    Here is what I would do. Use a text editor and convert the sql file into csv. This is actually not that difficult.

    You will need the Create Table sql code to build the database structure. You can execute this with phpmyadmin.

    Then upload the file - uncompressed - into a folder named 'import'. name it database.txt.

    Then use the folowing script. Copy and paste it in a text editor - then save it as import.php. You need to edit the script to match your database structure, etc. Upload the file into the import folder where the database.txt file is.

    Once this is done, go to your browser and type http://yourdomain.com/import/import.php

    When the script is done you will see Completed! in your browser window.

    I wrote this script to import databases with over 4 million records. I cannot guarantee it will work, but for what I used it for it worked great.

    <?PHP
    $DATABASE_SERVER = ':/var/lib/mysql/mysql.sock';
    $DATABASE_NAME = 'database name';
    $DATABASE_USER = 'user name';
    $DATABASE_PASSWORD = 'password';
    $client_flags = 128;

    $dblink = mysql_connect($DATABASE_SERVER, $DATABASE_USER, $DATABASE_PASSWORD, FALSE, $client_flags);
    mysql_select_db($DATABASE_NAME, $dblink);

    $sql = "LOAD DATA LOCAL INFILE 'database.txt' INTO TABLE `TABLE NAME?` FIELDS TERMINATED BY ',' ENCLOSED BY '\"' ESCAPED BY '\\\\' LINES TERMINATED BY '\r\n' (field1,field2,field3,field4, etc)";

    $result = mysql_query($sql, $dblink) or die("load -" . mysql_error());

    ?>


    Completed!
     
    ntp, Feb 21, 2008 IP
  20. doonn

    doonn Active Member

    Messages:
    347
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    60
    #20
    can you please explain this ...
    i didnt get this ... how do you convert sql to scv ..... i didnt find any software for that thoo.....

    plzzz help

    thnxxx
     
    doonn, Feb 23, 2008 IP