By default Ghost uses sqlite3. But if you want to configure Ghost with MySQL Database, you can reconfigure the default settings in config.js file.
Open config.js (<path-to-your-project>/config.js), replace the below lines of code:
database: {
client: 'sqlite3',
connection: {
filename: path.join(__dirname, '/content/data/ghost2.db')
},
}
with the MySql configuration. Here is the syntax:
database: {
client: 'mysql',
connection: {
host: 'localhost',
user: 'database-user',
password: 'database-user-password',
database: 'database-name',
charset: 'utf8'
},
}
Note: Replace database-user, database-user-password and database-name with the actual details.
0 Comment(s)