I'm following a book "Agile Web Application Development with Yii" and I am setting up a database connection to the Yii application through an application component.
I followed the books instructions and said the mysql db host is 127.0.0.1. I ran a test and it failed to connect.
Then I changed the host to "localhost" and it works.
Does anyone know why this is the case?