Jump to content

Problem with huge database


jeffblochjr

Recommended Posts

I am trying to move a mysql database from a site on one server to a new site on a different server. I dumped the old site\'s structure and imported it into a new mysql database on the new web site... but there is 700 meg of data on the old database. 26 text files make up the bulk of this 700 meg, and they must be uploaded to 26 tables on this new mysql database on the new server. When I try to do this via phpMyAdmin, it freezes up on me because it takes so long (I\'m even using a cable internet connection!). What are my other options for uploading the data of these tables? I have to get this information into the new database, but it always times out. Please help! Thanks.

 

Jeff

Link to comment
Share on other sites

My problem is... I have the whole structure of the database all worked out and transferred over. Now I need to move the 700+ meg of data from the old database to the new. I have these 26 data files (text documents) on my hard drive, and I click on \"Insert data from a textfile into table\" for the respective table. Then, I direct it to look at the text file on my hard drive, and click Submit. Then I wait about 3 or 4 minutes... and the page basically reloads itself. No confirmation or error messages... it just reloads and stops reading the file. That\'s it. How else can I get the data from these text files into the tables? Please help, I am stumped.

Link to comment
Share on other sites

I\'m affraid I don\'t know much about mysql or writing scripts... and unfortunately I wouldn\'t know the first thing about writing a script to perform that action. There is no other way to simply upload this textual data into the mysql database? I mean, why isn\'t it working when I tell it to \"Insert data from a textfile into table\"??

Link to comment
Share on other sites

As it turns out, I dont have access to edit php.ini, and my web host couldn\'t help me much with it. I did, however, get this whole big problem to solve itself with a simple \"LOAD DATA INFILE...\" command (after uploading these incredible huge text files onto my web site), and it worked like a charm. Thanks for all the help you guys have given me.

Link to comment
Share on other sites

Here\'s yet another problem... everything was going fine, but then I hit a certain file and I did this command as usual:

 

LOAD DATA INFILE \'/var/www/html/data/records_t.txt\' INTO TABLE records_t FIELDS TERMINATED BY \';\' ENCLOSED BY \'\"\' LINES TERMINATED BY \"n\";

 

However, this time for some reason, I get the following message:

 

Error



SQL-query :  



LOAD DATA INFILE \'/var/www/html/data/records_t.txt\' INTO TABLE records_t FIELDS TERMINATED BY \';\' ENCLOSED BY \'"\' LINES TERMINATED BY "n" 



MySQL said: 



Got error 122 from table handler

 

What should I do? How can these tables be corrupt? I just exported the structure from another database and uploaded it to this one. Please help!

Link to comment
Share on other sites

guess I arrived too late..... :!:

 

here\'s something for the huge mysql backups that can easily be done using your webbrowser.

 

copy this coding and call it dump.php

 

<?php

include (\"YourConfigFile.php\");

$output=system(\"mysqldump -u \".$db_user.\" -p\".$db_pass.\" \".$db_dbname.\" --opt > NameOfFilebackup.sql\");

header(\"Location: NameOfFilebackup.sql\")

?>

 

create a blank file: NameOfFilebackup.sql

chmod it to 777

change to your specs: $db_user, $db_pass, $db_dbname

 

call dump.php in your browser and when it is complete you will have

your table/data imported into the file NameOfFilebackup.sql

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.