I started to learn phalcon long time ago but now I re-learn it again as I forgot how to do things. I tried to use phalcon model to generate model but it threw me an exception:
ERROR: SQLSTATE[HY000] [2002] No such file or directory
and then I tried to check the connection, and apparently I cannot connect to database. My config file is like this:
'database' => [ 'adapter' => 'Mysql', 'host' => 'localhost', 'username' => 'root', 'password' => '', 'dbname' => 'mysite', 'charset' => 'utf8', ],
I don't know what is wrong with my config. Please tell me how to fix it. Thank you.