Updated on Jul 13, 2018
By default Ghost uses sqlite3 database. Still, if you would like to have your Ghost Blog installed and configured with MySQL database you can reconfigure the default settings in the
config.js
file following this guide.
Login your server via SSH and navigate to your Ghost root directory. If you have followed our Ghost and Node installation guide your Ghost directory should be under /var/www/ghost.
Open config.js
file using your favorite text editor and locate the Production environment settings which should be somewhere around line 43.
You will need to replace the following lines:
database: { client: 'sqlite3', connection: { filename: path.join(__dirname, '/content/data/ghost2.db') },
with your MySQL configuration using the following syntax:
database: { client: 'mysql', connection: { host: 'localhost', user: 'database-user', password: 'database-user-password', database: 'database-name', charset: 'utf8' },
Remember to replace database host
, database-user
, database-user-password
and database-name
with your actual settings. After that, you can continue with the Manual Ghost Installation process.