jeffblochjr Posted January 5, 2003 Share Posted January 5, 2003 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 Quote Link to comment https://forums.phpfreaks.com/topic/17-problem-with-huge-database/ Share on other sites More sharing options...
effigy Posted January 5, 2003 Share Posted January 5, 2003 jeff, can you do the backup at the command line interface? Quote Link to comment https://forums.phpfreaks.com/topic/17-problem-with-huge-database/#findComment-31 Share on other sites More sharing options...
Uranium-235 Posted January 5, 2003 Share Posted January 5, 2003 considering he has to use phpmyadmin, I doubt he has access to any command line Quote Link to comment https://forums.phpfreaks.com/topic/17-problem-with-huge-database/#findComment-32 Share on other sites More sharing options...
jeffblochjr Posted January 5, 2003 Author Share Posted January 5, 2003 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. Quote Link to comment https://forums.phpfreaks.com/topic/17-problem-with-huge-database/#findComment-33 Share on other sites More sharing options...
Uranium-235 Posted January 5, 2003 Share Posted January 5, 2003 If the mysql port isn\'t blocked on your first server. write a script to connect to it and just transfer it over Quote Link to comment https://forums.phpfreaks.com/topic/17-problem-with-huge-database/#findComment-34 Share on other sites More sharing options...
jeffblochjr Posted January 5, 2003 Author Share Posted January 5, 2003 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\"?? Quote Link to comment https://forums.phpfreaks.com/topic/17-problem-with-huge-database/#findComment-35 Share on other sites More sharing options...
Uranium-235 Posted January 5, 2003 Share Posted January 5, 2003 probably cause of the 2Meg upload limit PHP has set default Quote Link to comment https://forums.phpfreaks.com/topic/17-problem-with-huge-database/#findComment-36 Share on other sites More sharing options...
jeffblochjr Posted January 5, 2003 Author Share Posted January 5, 2003 That\'s gotta be it!! How can I change that value? I just have to get these text files into my database. Is there any way to disable this upload limitation? Quote Link to comment https://forums.phpfreaks.com/topic/17-problem-with-huge-database/#findComment-37 Share on other sites More sharing options...
jeffblochjr Posted January 5, 2003 Author Share Posted January 5, 2003 If I can get into shell, and I have these huge text files already uploaded to my website... is there a command I can use to import these files into my MySQL database tables? Quote Link to comment https://forums.phpfreaks.com/topic/17-problem-with-huge-database/#findComment-38 Share on other sites More sharing options...
effigy Posted January 6, 2003 Share Posted January 6, 2003 the upload limit is changed in the php.ini file at this line: upload_max_filesize if you can get to the command line you can backup everything from there by using the mysql binary. Quote Link to comment https://forums.phpfreaks.com/topic/17-problem-with-huge-database/#findComment-39 Share on other sites More sharing options...
jeffblochjr Posted January 6, 2003 Author Share Posted January 6, 2003 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. Quote Link to comment https://forums.phpfreaks.com/topic/17-problem-with-huge-database/#findComment-40 Share on other sites More sharing options...
jeffblochjr Posted January 11, 2003 Author Share Posted January 11, 2003 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! Quote Link to comment https://forums.phpfreaks.com/topic/17-problem-with-huge-database/#findComment-92 Share on other sites More sharing options...
jeffblochjr Posted January 11, 2003 Author Share Posted January 11, 2003 When I do a check on these \"corrupted\" tables, I get these messages: Table is marked as crashed and last repair failed Size of datafile is: 14008320 Should be: 0 Can\'t read indexpage from filepos: 147456 Corrupt Any suggestions? Quote Link to comment https://forums.phpfreaks.com/topic/17-problem-with-huge-database/#findComment-93 Share on other sites More sharing options...
webworks Posted January 17, 2003 Share Posted January 17, 2003 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 Quote Link to comment https://forums.phpfreaks.com/topic/17-problem-with-huge-database/#findComment-158 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.