SQLSTATE HY000 2002 while running bake command

前端 未结 6 1927
不思量自难忘°
不思量自难忘° 2021-02-02 02:48

I have problem running the bake commands. i think it is related to mysql but i didn\'t find any solution to this error on Stackoverflow. This is my app.php:

6条回答
  •  孤城傲影
    2021-02-02 03:10

    Changing 'host' => 'localhost', to 'host' => '127.0.0.1', resolve the issue with Exception for me.

     'Datasources' => [
            'default' => [
                'className' => 'Cake\Database\Connection',
                'driver' => 'Cake\Database\Driver\Mysql',
                'persistent' => false,
                'host' => '127.0.0.1',
    

    I'm running on the Ampps.

提交回复
热议问题