mapleleaf Posted May 3, 2010 Share Posted May 3, 2010 What is the command line for importing a database into mysql? What I really mean is to upload the database writing over the old one. I have a dump file. Link to comment https://forums.phpfreaks.com/topic/200567-import-mysql/ Share on other sites More sharing options...
jdavidbakr Posted May 3, 2010 Share Posted May 3, 2010 mysql < file.sql That will execute all SQL commands in file.sql. (Just be careful because you won't get any warnings about any "drop" commands) If you're sql file doesn't have the drop commands in it, you might need to do that manually. Depends on how the dump was created that you're importing. Link to comment https://forums.phpfreaks.com/topic/200567-import-mysql/#findComment-1052556 Share on other sites More sharing options...
mapleleaf Posted May 4, 2010 Author Share Posted May 4, 2010 the sql.sql file being on my local machine. What path does it need to know? Link to comment https://forums.phpfreaks.com/topic/200567-import-mysql/#findComment-1053105 Share on other sites More sharing options...
fenway Posted May 4, 2010 Share Posted May 4, 2010 the sql.sql file being on my local machine. What path does it need to know? The path to the file. Link to comment https://forums.phpfreaks.com/topic/200567-import-mysql/#findComment-1053143 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.