Web Hosting Talk







View Full Version : Another way to import .sql file?


lexington
07-15-2007, 05:05 AM
Hello, I googled other sites for this info but my case is different since I only exported a single table in phpmyadmin and saved it as a zipped .sql file. I went to the DB name in phpmyadmin and selected import, and even though the file is only 7MB it seemed to stop exporting all of the data right near the end. Is there another way I can import this data though ssh or something? The problem is that it is only a table out of a DB so if I do import it via ssh how will it know which db to insert the table? If anyone could give me the exact step by step instructions on how to do this it would be appreciated. Or if anything could you tell me how to increase the timeout time of phpmyadmin so I can upload the whole file. Thanks.

lexington
07-15-2007, 05:18 AM
I searched some more and came across this command on Google:

mysql database_name -u user_name -ppassword < file.sql

Will that work?

lexington
07-15-2007, 05:32 AM
Yay I restored it so ignore this topic :) That command works.