Update Ghost v3 from 2.25.1 failure

When I update ghost v3 from 2.25.1 use method from how to update. It shows that an error occurred.

Debug Information:
OS: linux, v3.10.0-957.21.3.el7.x86_64
Node Version: v10.16.0
Ghost-CLI Version: 1.12.0
Environment: production
Command: ‘ghost update’
An error occurred.
Message: ‘SELECT value FROM settings WHERE key = “active_theme”; - ER_NO_DB_ERROR: No database selected’

Stack: Error: ER_NO_DB_ERROR: No database selected
at Query.Sequence._packetToError (/home/wwwroot/ghost/versions/3.0.0/node_modules/mysql/lib/protocol/sequences/Sequence.js:47:14)
at Query.ErrorPacket (/home/wwwroot/ghost/versions/3.0.0/node_modules/mysql/lib/protocol/sequences/Query.js:77:18)
at Protocol._parsePacket (/home/wwwroot/ghost/versions/3.0.0/node_modules/mysql/lib/protocol/Protocol.js:291:23)
at Parser._parsePacket (/home/wwwroot/ghost/versions/3.0.0/node_modules/mysql/lib/protocol/Parser.js:433:10)
at Parser.write (/home/wwwroot/ghost/versions/3.0.0/node_modules/mysql/lib/protocol/Parser.js:43:10)
at Protocol.write (/home/wwwroot/ghost/versions/3.0.0/node_modules/mysql/lib/protocol/Protocol.js:38:16)
at Socket. (/home/wwwroot/ghost/versions/3.0.0/node_modules/mysql/lib/Connection.js:91:28)
at Socket. (/home/wwwroot/ghost/versions/3.0.0/node_modules/mysql/lib/Connection.js:525:10)
at Socket.emit (events.js:198:13)
at addChunk (_stream_readable.js:288:12)

But I checked this sql ** 'SELECT value FROM settings WHERE key = “active_theme” ** in db, it returns casper. I am confused.

Any help will be appreciated.

Hey there @Dennis_Li :wave:. Can I ask if you’ve made any modifications to your install prior to this? Thanks :slightly_smiling_face:

Thanks for reply.

I just update the ghost-cli. Because I first use ghost update, it shows that

Message: You are about to migrate to Ghost 2.0. Your blog is not on the latest Ghost 1.0 version.
Help: Instead run “ghost update --v1”.

After that, I use ghost update again. And the error occurred.
:thinking:

Sorry I’ll rephrase, have you made changes to the code of your copy of Ghost?