c_pattle Posted April 22, 2012 Share Posted April 22, 2012 I have a .sql file that has lots of sql commands in it. What I want to do is then run all of these commands on a database. I was just wondering what the best approach would be. Is there a way to import the file or am I best opening the file, reading each line and then performing that query? Thanks for any help. Quote Link to comment Share on other sites More sharing options...
trq Posted April 22, 2012 Share Posted April 22, 2012 mysql databasename < file.sql 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.