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.

wp-config.php

define('DB_HOST', '127.0.0.1:3306');

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

This topic was automatically closed after 42 days. New replies are no longer allowed.