Hi, Can someone tell me how to import the data from a .sql file using mysqlsumb on a live website. I mean I have used it when data was on my local machine but how to do when website is live and database is stored remotely i-e when website is hosted.
Install phymyAdmin. Go to Import. Select your sql file on your local machine and upload/execute file. Most hosting companies preinstalls phpmyadmin, you may also have it. I also suggest mysqldumper (mysqldumper.de/en). It is very easy to install and backup & restore operations are fast.
The SQL File is just a text file. You can always break them up into several parts. Of course, uploading it and let your web host restore it is a very good idea.
Yeah as already suggested, break the SQL file into smaller chunks and import, or get your host to sort it out.
If you have shell access I usually use the following: mysql -u user -p -D database < backup.sql Code (markup):
@kool002: You can try my second suggestion mysqldumper. It backup and restores sql files with little chunks so It never timeouts. I am using it with millions of records and I never had a problem.