作ったプロジェクトの中に config ディレクトリがあるのでその中の app.conf を vim かなんかで書き換える
datasource みたいな 階層(?) があるのでそこを基本的に書き換える
'Datasources' => [
'default' => [
'className' => 'Cake\Database\Connection',
'driver' => 'Cake\Database\Driver\Mysql',
'persistent' => false,
'host' => 'localhost',
/**
* CakePHP will use the default DB port based on the driver selected
* MySQL on MAMP uses port 8889, MAMP users will want to uncomment
* the following line and set the port accordingly
*/
//'port' => 'non_standard_port_number',
'username' => 'root',
'password' => 'hogehoge',
'database' => 'TEST',
'encoding' => 'utf8',
'timezone' => 'UTC',
'flags' => [],
'cacheMetadata' => true,
'log' => false,
基本的に書き換えるのは
'username' => 'root', 'password' => 'hogehoge', 'database' => 'TEST', 'encoding' => 'utf8', 'timezone' => 'UTC',
の部分かと思われます mysql やら何やらで設定した DB 設定をそのまま記載するだけで大丈夫です。


