title: Can't connect to embedded Derby database in IntelliJ IDEA because database is in use
body: <p>I'm working on an app that uses embedded database (Derby). My IDE is IntelliJ IDEA 14.1.3. I tried creating the database in the IDE:</p>
  
  <blockquote>
    <p>Database > New > Data Source > Derby > Embedded</p>
  </blockquote>
  
  <p>The database is created in Program Files, in IDEA's folder. However, I can't access it with this:</p>
  
  <pre><code>Connection connection = DriverManager.getConnection("jdbc:derby:databaseName;create=true");
  </code></pre>
  
  <p>When I try to connect to the database (using the line above) it creates a new database in the project folder.</p>
  
  <p>Is there a way to easily connect to the database from the app and manage it in IDEA's data source manager?</p>