title: How do I tell IntelliJ to run a query on a different database?
body: <p>I am using IntelliJ IDEA 13.  I have a .sql file with mysql queries in it.  I have been running the queries on localhost, but now I would like to run them on my dev database server (which has the same database and tables).  I didn't want to delete the localhost connection.  However, whenever I press Ctrl-Enter on a sql query, IntelliJ (un)helpfully reopens the localhost data connection and runs it there.  How do I tell IntelliJ to associate my .sql file with the new database connection instead of the old one?  I would prefer not to delete the old connection entirely, although I know that is a workaround.</p>