This is not how it works.
You should leave that line intact:
$connect = new mysqli($config['sqlHost'], $config['sqlUser'], $config['sqlPassword'], $config['sqlDatabase']);
Instead you should configure the database in config.php:
// phpmyadmin username for OT server: (DONT USE "root" if...