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. Quote Link to comment 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. Quote Link to comment 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? Quote Link to comment 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. Quote Link to comment 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.