Proper way to have multiple installs with a single database

Silly me, I posted this before doing a proper investigation.

The issue isn’t with WordPress, it was instead with how Polylang (translation plugin) handled the site url. The solution was to put define('PLL_CACHE_HOME_URL', false); in the wp-config.php before I changed the URL using the WP constants.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)