when i try to import huge table(using ssh) the server stop responding this is the command i use mysql -uusername -ppassword databasename < tablename.sql but if the file is big the server stops responding so i wait for hlaf an hour restart the server but when i turn it on and see what has been imported i see that 1/3 of the table was imported so how can i fix this ? i have 4gb ram and quad core xeon 3210 - centos 5 i posted this in php fourm also ( i did this becuase i need an answear as fast as possible) thanks
You need to tune MySQL configuration file a little bit if the table type is MyISAM. Increas myisam_sort_buffer_size value a bit like myisam_sort_buffer_size=256M Code (markup): Restart the server after making this change and import the table. You need to be patient as crivion said.
To import some files to your database, you could use an ETL program. It is an Extract, transform and load application. It will allow you to upload files to your ftp and perform other types of operation - data synchronisation, data migration... There are many ETL tools you can use. Talend open studio is what you would need. It is downloadable from the website: http://www.talend.com/download.php