How to change database connection port?

Hi there! :slight_smile:
I’ve moved today my ConcreteCMS based website from one server to another. I’ve deleted cache folder content, changed \application\config\database.php data but I’ve got an errors:

**Fatal error** : Uncaught InvalidArgumentException: Driver [c5_pdo_mysql] not supported. in /updates/concrete-cms-9.2.1_remote_updater/concrete/vendor/illuminate/support/Manager.php:107 Stack trace: #0 /updates/concrete-cms-9.2.1_remote_updater/concrete/vendor/illuminate/support/Manager.php(79): Illuminate\Support\Manager->createDriver() #1 /updates/concrete-cms-9.2.1_remote_updater/concrete/src/Database/Driver/DriverManager.php(22): Illuminate\Support\Manager->driver()

Any solutions please?

I’ve changed updates/concrete-cms-9.2.1_remote_updater/concrete/config/database.php and application/config/database.php to:

return [
    'default-connection' => 'concrete',
    'drivers' => [ 'pdo_mysql' => 'Doctrine\DBAL\Driver\PDOMySql\Driver' ],
    'connections' => [
        'concrete' => [
            'driver' => 'pdo_mysql',
            'server' => 'localhost',
            'database' => 'db_name',
            'username' => 'user_name',
            'password' => 'password',
            'character_set' => 'utf8mb4',
            'collation' => 'utf8mb4_unicode_ci',
        ],
    ],
];

and now I’ve got:

Fatal error: Uncaught PDOException: SQLSTATE[HY000] [1045] Access denied for user 'user_name'@'localhost' (using password: YES) in /updates/concrete-cms-9.2.1_remote_updater/concrete/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:40

I’m sure that datbase name, username and password are correct because I can connect.

Ok, the problem is that MySQL server is working on non standard port - 3380. Where can I put it? I’ve tried:

'server' => '127.0.0.1:3380',
'server' => '127.0.0.1;port=3380',
'port' => '3380',

with no result :frowning:

The first option should work. I run on a non-standard port locally, so my config has this line in it:

server' => '127.0.0.1:8306',

An Access Denied error tends to be wrong password, not that it can’t connect. If it’s the wrong address or port, I think that reports a timeout.

1 Like