Ghost: Can’t Upgrade from v2.27 to v3.8 ER_NO_SUCH_TABLE error
Issue Summary
I am trying to upgrade my Ghost v2.27 install to v3.8 and I am getting the following error
You can also check theme compatibility at https://gscan.ghost.org
? Are you sure you want to proceed with migrating to Ghost 3.8.0? Yes ✔ Updating to a major version
- sudo systemctl stop ghost_chrometips-nspeaks-com ✔ Stopping Ghost ✔ Linking latest Ghost and recording versions
- sudo systemctl start ghost_chrometips-nspeaks-com
- sudo systemctl stop ghost_chrometips-nspeaks-com ✖ Restarting Ghost A GhostError occurred.
Message: show columns from
emails- ER_NO_SUCH_TABLE: Table ‘chrometips.emails’ doesn’t exist Suggestion: journalctl -u ghost_chrometips-nspeaks-com -n 50Debug Information: OS: Ubuntu, v18.04.4 LTS Node Version: v10.19.0 Ghost Version: 3.8.0 Ghost-CLI Version: 1.13.1 Environment: production Command: ‘ghost upgrade’
Additional log info available in: /home/<user>/.ghost/logs/ghost-cli-debug-2020-02-25T13_30_27_168Z.log
Contents of the Log file
Debug Information:
OS: Ubuntu, v18.04.4 LTS
Node Version: v10.19.0
Ghost Version: 3.8.0
Ghost-CLI Version: 1.13.1
Environment: production
Command: 'ghost upgrade'
Message: show columns from `emails` - ER_NO_SUCH_TABLE: Table 'chrometips.emails' doesn't exist
Suggestion: journalctl -u ghost_chrometips-nspeaks-com -n 50
Stack: Error: show columns from `emails` - ER_NO_SUCH_TABLE: Table 'chrometips.emails' doesn't exist
at Server.server.close (/usr/lib/node_modules/ghost-cli/lib/utils/port-polling.js:38:28)
at Object.onceWrapper (events.js:286:20)
at Server.emit (events.js:198:13)
at emitCloseNT (net.js:1619:8)
at process._tickCallback (internal/process/next_tick.js:63:19)
Result of the journalctl command - http://bit.ly/2vZxJ6p 2
To Reproduce
- Tried ghost update
- Tried ghost update --force
- Followed https://ghost.org/update/?v=2.0
Technical details:
- Ghost Version: 2.27
- Node Version: 10.19
- Browser/OS: Ubuntu 18.04.4
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 18 (9 by maintainers)
@naz thanks for the detailed write up, I think we can safely say this is not a migration bug as it originally appeared and we don’t need to do anything further 👍
Summary of this issue:
Ghost does not yet officially support MySQL 8. This is because Node.js does not yet have support for MySQL 8.
There are two main points of incompatibility.
To the best of my knowledge neither of these things actually with cause problems with Ghost.
What does cause problems, generally, is mixed collations. This is known to cause unique constraints to fail.
To repeat - MySQL 8 isn’t supported in Ghost but probably works. MySQL 8 isn’t the problem here, mixed collations is and that’s a general administering mysql problem rather than a Ghost problem.
I don’t know what happened here to end up with the different collations, but I assume mysql was upgraded or the content was transferred.
In MySQL 8 the default charset is utf8mb4 (what Ghost uses) & the default collation is utf8mb4_0900_ai_ci. utf8mb4_general_ci was the default in earlier versions of MySQL. I assume this is related.
Going to close this as figuring out how to fix it is definitely outside of scope here - although feel free to post in our community.
Hey @andrewmatveychuk I did receive the snapshot on my account but haven’t have a chance to look into it yet. It is on my list of things to do.
Just one more thing. I used MariaDB 10.3. Not sure if that matters.
And I am pasting the content of the journalctl command here instead of the paste.org link in my original post above. Easier to track.
The only additional information I can give now is here: https://forum.ghost.org/t/cant-upgrade-from-v2-27-to-v3-8-er-no-such-table-error/12271/5