eba8
March 2, 2021, 12:36pm
1
Hi there
I’m looking to install ghost with a DigitalOcean db cluster and not a local db on the server.
I can’t seem to figure out what the issue is with my setup.
Debug Information:
OS: Ubuntu, v18.04.4 LTS
Node Version: v10.23.0
Ghost Version: 3.41.9
Ghost-CLI Version: 1.13.1
Environment: production
Command: 'ghost start'
Message: Invalid database host.
Config: (not actually using variables for now but modified for safety)
"database": {
"client": "mysql",
"connection": {
"host": "name-db-do-user-1234556-0.b.db.ondigitalocean.com",
"database__connection__port": port_number,
"user": "db_user",
"password": "db_password",
"database": "database_name"
}
eba8
March 3, 2021, 12:55am
3
After running some more tests I was able to isolate the problem.
It leads me to this thread:
I am using the image ghost:3.35.5-alpine with the database client mysql. I am using mysql database from digitalocean and I getting an error which preventing the container from starting.
[2020-10-18 21:19:29] ERROR create table `migrations_lock` (`lock_key` varchar(191) not null, `locked` boolean default '0', `acquired_at` datetime null, `released_at` datetime null) default character set utf8mb4 - UNKNOWN_CODE_PLEASE_REPORT: Unable to create or change a table without a primary key, when the syst…
Any recommendations on a database that would work with Ghost? Looks like DigitalOcean wasn’t a good choice for Ghost with a managed db.
Kevin
March 3, 2021, 8:05am
4
@eba8 Ghost 4.0 has fixes for tables without primary keys. Perhaps you could start with a local mysql database and then migrate to the managed db once 4.0 is released and you’ve upgraded?
1 Like
eba8
March 3, 2021, 12:01pm
5
Thanks, Kevin.
That’s what I ended up going with. Just don’t like this solution but would prefer to stick with Ghost.
Any timeline on the release of 4.0? Just that feature makes the release oh so exciting