Connect PyCharm to SQLite on Windows

To connect to a SQLite database on PyCharm you have two options:

  1. Manual connection and
  2. Automatic connection.

Manual connection

Use the following steps to perform the manual connection:

  1. Open the Database tab in PyCharm (usually on the right hand side)
  2. Right-click and select the New > Data Source option in the menu. A dialog box will pop up:
    Setting pycharm DB connection on windows
    Setting pycharm DB connection on windows
  3. Select the SQLite driver (download it if necessary)
  4. Add the Database URL like jdbc:sqlite:<absolute path to your db file>/db.sqlite

    A concrete example would be:

The automatic way

This way is simpler:

  1. Open the Database tab in PyCharm
  2. Locate the database file in the Project explorer (or in Windows Explorer)
  3. Drag and drop it in the Database tab

This should work easily. If it doesn’t, ti means you don’t have the drivers installed and you need to go to the Manual method above and install the driver.


A little experiment: If you find this post and ad below useful, please check the ad out :-)




2 thoughts on “Connect PyCharm to SQLite on Windows

  1. Hi

    I am using PyCharm Community Edition 4.0.6 and I dont see the “Database tab”. Where can I find it??

    1. The community edition doesn’t have it unfortunately. You can try to find another plugin, but last time I looked I could not find something similar to the one in the pro version.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to top