My Site was running perfectly with DigitalOcean Oneclick Ghost Hosting it’s works perfectly, I’d like to have 2nd website for other domain, on issue on installation sinceI follow the instruction from website below.
However, it seems both site are shared the same database with same login, any suggest on MySQL setup?
This is how I do it.
I assume:
- You are logged in to your droplet
- Your domain name is ready and connected to the droplet IP
➊
You need the current MySQL host, username, and password.
cd /var/www/ghost/
cat config.production.json
Take notes of them.
➋
Create a website directory, for example, ubud
.
cd /var/www/
sudo mkdir ubud
sudo chown ghost-mgr:ghost-mgr ubud/
➌
Login to MySQL and create a new database.
sudo mysql -u root -p
CREATE DATABASE ubud;
GRANT ALL PRIVILEGES ON ubud.* to 'ghost'@'localhost' IDENTIFIED BY '7d150600c49e7c5860be7ce03d4f8df67259176738d926ec';
FLUSH PRIVILEGES;
exit
-
ghost
→ database user -
localhost
→ database host -
7d150600c49e7c5860be7ce03d4f8df67259176738d926ec
→ database password
➍
Switch to the ghost-mgr
user.
sudo -i -u ghost-mgr
➎
Install Ghost and follow the installation steps.
cd /var/www/ubud/
ghost install
That’s it.
Make sure to have a droplet backup before doing anything.
Thanks for the step by step guide, will try out ghost install
with follow once I have droplet backup.
Enter your blog URL: https://<yourwebsitename>
? Enter your MySQL hostname: localhost
? Enter your MySQL username: ghost
? Enter your MySQL password: 7d150600c49e7c5860be7ce03d4f8df67259176738d926ec
? Enter your Ghost database name: ubud #Database