I want to connect to CakePHP3.77 with MySQL 5.7.25 in MAMP. I cannot connect with database named cake_youtube_db.

Error Message is this.

CakePHP is NOT able to connect to the database. Connection to database could not be established: SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client

I did try create other users and put user and password. However they did not work.


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

            //'port' => 'non_standard_port_number',
            'username' => 'root',
            'password' => 'root',
            'database' => 'cake_youtube_db',

SQL plugin is mysql_native_password. I expect Database will be connected with my cakeapp.

0 Answers