question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Install fails on --db sqlite3 --dbpath <path>

See original GitHub issue

Please help me. I’ve been trying to do this for a day now. It tries to connect to the MySQL host even if I don’t need MySQL. And in this, it fails.

root@thecyberfibre:~/.ghost/logs# cat ghost-cli-debug-2017-07-10T09_31_35_408Z.log 
Debug Information:
    Node Version: v6.11.0
    Ghost-CLI Version: 1.0.0-beta.6
    Environment: production
    Command: 'ghost install --db sqlite3 --dbpath ./content/data/ghost.db'
An error occurred.
Message: 'connect ECONNREFUSED 127.0.0.1:3306'

Stack: Error: connect ECONNREFUSED 127.0.0.1:3306
    at Object.exports._errnoException (util.js:1018:11)
    at exports._exceptionWithHostPort (util.js:1041:20)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1086:14)
    --------------------
    at Protocol._enqueue (/usr/lib/node_modules/ghost-cli/node_modules/mysql/lib/protocol/Protocol.js:141:48)
    at Protocol.handshake (/usr/lib/node_modules/ghost-cli/node_modules/mysql/lib/protocol/Protocol.js:52:41)
    at Connection.connect (/usr/lib/node_modules/ghost-cli/node_modules/mysql/lib/Connection.js:130:18)
    at /usr/lib/node_modules/ghost-cli/node_modules/knex/lib/dialects/mysql/index.js:106:18
    at Promise._execute (/usr/lib/node_modules/ghost-cli/node_modules/bluebird/js/release/debuggability.js:300:9)
    at Promise._resolveFromExecutor (/usr/lib/node_modules/ghost-cli/node_modules/bluebird/js/release/promise.js:483:18)
    at new Promise (/usr/lib/node_modules/ghost-cli/node_modules/bluebird/js/release/promise.js:79:10)
    at Client_MySQL.acquireRawConnection (/usr/lib/node_modules/ghost-cli/node_modules/knex/lib/dialects/mysql/index.js:104:12)
    at Object.create (/usr/lib/node_modules/ghost-cli/node_modules/knex/lib/client.js:239:16)
    at Pool._createResource (/usr/lib/node_modules/ghost-cli/node_modules/generic-pool/lib/generic-pool.js:354:17)
    at Pool._ensureMinimum (/usr/lib/node_modules/ghost-cli/node_modules/generic-pool/lib/generic-pool.js:408:12)
    at new Pool (/usr/lib/node_modules/ghost-cli/node_modules/generic-pool/lib/generic-pool.js:157:8)
    at Client_MySQL.initializePool (/usr/lib/node_modules/ghost-cli/node_modules/knex/lib/client.js:269:17)
    at Client_MySQL.Client (/usr/lib/node_modules/ghost-cli/node_modules/knex/lib/client.js:116:12)
    at new Client_MySQL (/usr/lib/node_modules/ghost-cli/node_modules/knex/lib/dialects/mysql/index.js:62:20)
    at Knex (/usr/lib/node_modules/ghost-cli/node_modules/knex/lib/index.js:60:34)
Code: ECONNREFUSED
root@thecyberfibre:~/.ghost/logs# 

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:17 (8 by maintainers)

github_iconTop GitHub Comments

3reactions
acburdinecommented, Jul 10, 2017

@regalstreak a workaround is to run ghost install --url <url> --db sqlite3 --dbpath ./content/data/ghost.db

Passing both url and db options skips the prompts for mysql data, which are actually what is causing the issue.

2reactions
acburdinecommented, Jul 10, 2017

Ah wait I know what’s going on - this is actually related to some other issues - will get this fixed asap though.

Read more comments on GitHub >

github_iconTop Results From Across the Web

python - Having problems with sqlite3's path? - Stack Overflow
I get an "NameError: name 'db_path' is not defined" error (even though it creates the profile.db file as per my main code). So...
Read more >
Opening A New Database Connection - SQLite
If the database is opened (and/or created) successfully, then SQLITE_OK is returned. Otherwise an error code is returned.
Read more >
Unable to read SQLite database from app - CommonsWare
I'm assuming that the problem is very similar. This copies the db file in from an external source… public boolean copyFileIn(Context context) {...
Read more >
RPM Database Recovery - rpm.org
The sqlite backend has files beginning with rpmdb.sqlite in the dbpath. The ndb backend has a Packages.db file. BDB backend has many files...
Read more >
error: sqlite_cantopen: unable to open database file - You.com
问题 访问sqlite数据库文件,文件用的是相对路径,在测试状态下一切正常,但是一旦发布安装后,会报错:unable to open database file.原因 出现这种错的可能原因: 找不到 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found