# Connecting to a database

**URL:** <https://discourse.slimframework.com/t/connecting-to-a-database/989>\
**Category:** Questions\
**Created:** [December 9, 2016, 2:57am UTC](https://discourse.slimframework.com/t/connecting-to-a-database/989 "2016-12-09T02:57:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ldco2016](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.slimframework.com/ldco2016/32/277_2.png) [@ldco2016](https://discourse.slimframework.com/u/ldco2016)\
**Post date:** [December 9, 2016, 2:57am UTC](https://discourse.slimframework.com/t/connecting-to-a-database/989/1 "2016-12-09T02:57:39Z")

</div>

I am not using the Slim Framework with either MAMP or XAMPP and I have tried to connect to the database via Sequel Pro and it has not worked. I am not sure if I have taken the correct steps.

I have a db php file with the properties to connect to the database, but how I need to create the tables and I tried connecting via Sequel Pro and the connection is failing. Please help.

---

<div class="post-metadata">

**Author:** ![RikuS](https://avatars.discourse-cdn.com/v4/letter/r/f07891/32.png) [@RikuS](https://discourse.slimframework.com/u/RikuS)\
**Post date:** [December 9, 2016, 9:18am UTC](https://discourse.slimframework.com/t/connecting-to-a-database/989/2 "2016-12-09T09:18:04Z")

</div>

Do you have database server up and running already? You can’t connect if there’s nothing to connect.

---

<div class="post-metadata">

**Author:** ![ldco2016](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.slimframework.com/ldco2016/32/277_2.png) [@ldco2016](https://discourse.slimframework.com/u/ldco2016)\
**Post date:** [December 9, 2016, 2:17pm UTC](https://discourse.slimframework.com/t/connecting-to-a-database/989/3 "2016-12-09T14:17:51Z")

</div>

@RikuS, I believe I have SQLite running. I executed this command at terminal: sqlite3 books\_db.sqlite which created a database in SQLite.
