Ghost is a popular and powerful open-source blogging platform known for its simplicity and elegant design. One of the key decisions when setting up Ghost is choosing the database backend. In this blog post, we will talk about the process of Ghost configuration with MySQL, a widely used and reliable relational database management system. By following these steps of instructions, you’ll be able to set up Ghost with MySQL and unleash the full potential of this fantastic platform.

Configuration of Ghost with MySQL

  1. At first, you need to log in to your own server and then need to go the Ghost root directory.

  2. Secondly, we need to open the config.js file using the VS code editor. Then need to navigate the production environment setting, which is around 43 lines.
  1. Thirdly we need to replace some code from the production environment setting below is the code,  
 database: {
            client: 'sqlite3',
            connection: {
                filename: path.join(__dirname, '/content/data/ghost2.db')

4. Fourthly we need to add some new code instead of the above code.

database: {
            client: 'mysql',
            connection: {
                host: 'localhost',
                user: 'database-user',
                password: 'database-user-password',
                database: 'database-name',
                charset: 'utf8'
  1. Finally, you need to add your own real data in the database host, database user, database user password, and database name. After completing this save the file.


Congratulations! You’ve successfully set up Ghost with MySQL. You gained the power of an effective and widely used database system for your blogging platform by combining Ghost with MySQL. Enjoy creating and sharing content with Ghost, knowing that your data is stored safely in a reliable MySQL database. If you need to know more about Ghost configuration then you can visit our blog here,

Leave a Comment

No Comment