# Error with knex self-hosted

**URL:** <https://forum.ghost.org/t/error-with-knex-self-hosted/17226>\
**Category:** Installation\
**Created:** [September 21, 2020, 3:06pm UTC](https://forum.ghost.org/t/error-with-knex-self-hosted/17226 "2020-09-21T15:06:02Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![k0ode](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/k0ode/32/9714_2.png) [@k0ode](https://forum.ghost.org/u/k0ode)\
**Post date:** [September 21, 2020, 3:06pm UTC](https://forum.ghost.org/t/error-with-knex-self-hosted/17226/1 "2020-09-21T15:06:02Z")

</div>

If you’re looking for some help, it’s important to provide as much context as possible so that people are able to assist you. Try to always mention:

- What’s your URL? This is the easiest way for others to debug your issue  
hitchcock.dev
- What version of Ghost are you using?  
3.33
- What configuration?  
Ubuntu 18.04 LTS  
MySQL
- What browser?  
Chrom
- What errors or information do you see in the console?  
brennan@localhost:/var/www/ghost$ ghost run  
The `ghost run` command is used by the configured Ghost process manager and for debugging. If you’re not running this to debug something, you should run `ghost start` instead.

- sudo node current/index.js  
/var/www/ghost/versions/3.33.0/node\_modules/knex-migrator/node\_modules/knex/lib/client.js:55  
throw new Error(`knex: Required configuration option 'client' is missing.`);  
^

Error: knex: Required configuration option ‘client’ is missing.  
at new Client (/var/www/ghost/versions/3.33.0/node\_modules/knex-migrator/node\_modules/knex/lib/client.js:55:11)  
at Knex (/var/www/ghost/versions/3.33.0/node\_modules/knex-migrator/node\_modules/knex/lib/knex.js:53:28)  
at Object.connect (/var/www/ghost/versions/3.33.0/node\_modules/knex-migrator/lib/database.js:26:12)  
at KnexMigrator.isDatabaseOK (/var/www/ghost/versions/3.33.0/node\_modules/knex-migrator/lib/index.js:589:32)  
at Object.module.exports.getState (/var/www/ghost/versions/3.33.0/core/server/data/db/migrator.js:13:25)  
at isDatabaseInitialisationRequired (/var/www/ghost/versions/3.33.0/core/server/index.js:172:21)  
at makeGhost (/var/www/ghost/versions/3.33.0/core/index.js:13:12)  
at Object. (/var/www/ghost/versions/3.33.0/index.js:27:1)  
at Module.\_compile (internal/modules/cjs/loader.js:778:30)  
at Object.Module.\_extensions…js (internal/modules/cjs/loader.js:789:10)  
at Module.load (internal/modules/cjs/loader.js:653:32)  
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)  
at Function.Module.\_load (internal/modules/cjs/loader.js:585:3)  
at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)  
at startup (internal/bootstrap/node.js:283:19)  
at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)

- What steps could someone else take to reproduce the issue you’re having?  
Ghost LS says site is running, but not responded and refusing connections.

---

<div class="post-metadata">

**Author:** ![vikaspotluri123](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/vikaspotluri123/32/24_2.png) [@vikaspotluri123](https://forum.ghost.org/u/vikaspotluri123)\
**Post date:** [September 21, 2020, 3:31pm UTC](https://forum.ghost.org/t/error-with-knex-self-hosted/17226/2 "2020-09-21T15:31:04Z")

</div>

It looks like you have not properly configured the `database` property in your configuration file. Can you share that portion with the credentials redacted?

---

<div class="post-metadata">

**Author:** ![k0ode](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/k0ode/32/9714_2.png) [@k0ode](https://forum.ghost.org/u/k0ode)\
**Post date:** [September 21, 2020, 3:34pm UTC](https://forum.ghost.org/t/error-with-knex-self-hosted/17226/3 "2020-09-21T15:34:59Z")

</div>

This was just an upgrade to a blog thats been running for a few years.

“url”: “[https://hitchcock.dev](https://hitchcock.dev)”,  
“server”: {  
“port”: 2368,  
“host”: “127.0.0.1”  
},  
“database”: {  
“connection”: {  
“user”: “user”,  
“password”: “pass”,  
“database”: “hitchcockdev\_prod”  
}  
},  
“mail”: {  
“transport”: “Direct”  
},  
“logging”: {  
“transports”: [  
“file”,  
“stdout”  
]  
},

---

<div class="post-metadata">

**Author:** ![vikaspotluri123](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/vikaspotluri123/32/24_2.png) [@vikaspotluri123](https://forum.ghost.org/u/vikaspotluri123)\
**Post date:** [September 21, 2020, 3:44pm UTC](https://forum.ghost.org/t/error-with-knex-self-hosted/17226/4 "2020-09-21T15:44:52Z")

</div>

> [@k0ode](#):
>
> “database”: {  
> “connection”: {  
> “user”: “user”,  
> “password”: “pass”,  
> “database”: “hitchcockdev\_prod”  
> }  
> },

You’re missing the `client` property - should be `mysql` or `sqlite3`

---

<div class="post-metadata">

**Author:** ![k0ode](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/k0ode/32/9714_2.png) [@k0ode](https://forum.ghost.org/u/k0ode)\
**Post date:** [September 21, 2020, 4:09pm UTC](https://forum.ghost.org/t/error-with-knex-self-hosted/17226/5 "2020-09-21T16:09:06Z")

</div>

This was the solution. I had to add a “client”: “mysql” under the database node. Odd that it went missing.
