Local database connection not working when upgrading to Kirby 4.0

I’m upgrading a project from Kirby 3.8 to 4.0. (php 8.3)
But the local database connection seems not to work anymore. A connection with a online database does work.
Any ideas what i do wrong?
This is the piece of code in my config file.

'db' => [
      'host'     => 'localhost',
      'database' => 'mylocaldb',
      'user'     => 'root',
      'password' => 'root',
   ]

This is my error:

The error is related to an authentication issue with your login, I don’t really see how this relates to your database.

Are you in the context of a development environment or on a live server?

i’m working local (mamp/prepros).
When i change my connection in the config file to an online database. Then it works. But i would like to work local with a local database which works perfect in previous kirby versions.

Is the database actually running? Can you connect via PHPMyAdmin or whatever you are using to manage your local database?

indeed, my phpadmin doesn’t run anymore with php 8.3.

Ok, then you need to figure out why that’s the case. Have you restarted MySql in Mamp? Other than that, you can use PHP 8.2 or 8.1 as before.