Ghost had recently (?) introduced support for MySQL. This is great in someways.

I use MAMP PRO on my MacBook to run the MAMP stack.

A new installation posed few challenges due to configuration of MAMP and needed the following changes.

First, change the config.js as follows to have Ghost setup for SQL.

         database: {
             client: 'mysql',
             connection: {
                 host     : '',
                 user     : 'XXX',
                 password : 'XXXX',
                 database : 'XXX_ghost',
                 charset  : 'utf8'

This didn't suffice and I was getting a ERROR: connect ECONNREFUSED error.

I had to make the following changes to sort it out make changes to my.cnf file File->Edit Template->MYSQL my.cnf shown below.

MYSQL my.cnf

Comment out the MAMP_skip-networking_MAMP and restart MAMP

You should then be able to connect to MySQL from any local IDE.

If you want to connect remotely then you can change the bind-address = to bind-address = which will allow connections from any IP address.

Change my.cnf file

Blog Logo


Ghost Lover!



Random Thoughts!

Fast and Mobile Life!

Back to Overview