Roots Discourse

Trouble Connecting to Database

I’m trying to learn Sage but having trouble connecting to a database during the WP install. I’m using Laravel Valet, along with DBngin. I’ll quickly walk through my problem with screenshots:

My DBngin setup:

My database name: sage_learning

Database opened in TablePlus:

Wordpress database connection details:

But then I get this error every time:

Can anyone see what I’m doing wrong?

You could try defining DB_HOST with a port, which looks to be in your case 3306.


define('DB_HOST', '');

I’m not sure whether that helps, but it’s worth a try.