# CakePHP 3.3 cannot connect to database

**URL:** <https://discourse.cakephp.org/t/cakephp-3-3-cannot-connect-to-database/1327>\
**Category:** Uncategorized\
**Created:** [October 15, 2016, 1:51am UTC](https://discourse.cakephp.org/t/cakephp-3-3-cannot-connect-to-database/1327 "2016-10-15T01:51:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nehcy](https://avatars.discourse-cdn.com/v4/letter/n/41988e/32.png) [@nehcy](https://discourse.cakephp.org/u/nehcy)\
**Post date:** [October 15, 2016, 1:51am UTC](https://discourse.cakephp.org/t/cakephp-3-3-cannot-connect-to-database/1327/1 "2016-10-15T01:51:55Z")

</div>

Hi,

I’m new to CakePHP. Recently I installed Apache 2.4, MySQL 5.7, and CakePHP 3.3.1 in Windows 10. When I started Apache and pointed browser to localhost:8080/CakePHP3, the page displayed an error message:

> Database

> CakePHP is NOT able to connect to the database.

> Datasource class cakephp\cakephp\src\Database\Connection could not be found.

Can anyone advise me what is going wrong here and how to correct it?

thanks and appreciate your response

---

<div class="post-metadata">

**Author:** ![jimgwhit](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/jimgwhit/32/378_2.png) [@jimgwhit](https://discourse.cakephp.org/u/jimgwhit)\
**Post date:** [October 16, 2016, 10:48pm UTC](https://discourse.cakephp.org/t/cakephp-3-3-cannot-connect-to-database/1327/2 "2016-10-16T22:48:14Z")

</div>

Can you connect with phpmyadmin or another like I use sqlyog? If you can connect there, make sure you have the config in cake set up correctly.

---

<div class="post-metadata">

**Author:** ![nehcy](https://avatars.discourse-cdn.com/v4/letter/n/41988e/32.png) [@nehcy](https://discourse.cakephp.org/u/nehcy)\
**Post date:** [October 19, 2016, 4:18pm UTC](https://discourse.cakephp.org/t/cakephp-3-3-cannot-connect-to-database/1327/3 "2016-10-19T16:18:19Z")

</div>

Hi Jim, thanks for hints! My issue was resolved by correcting the data source configuration in app.php. “ **cakephp\cakephp\src\Database\Connection** ” is an actual path, the correct mappings are:

‘className’ =\> ‘Cake\Database\Connection’,  
‘driver’ =\> ‘Cake\Database\Driver\Mysql’,
