Nextcloud-sqlstate[hy000] [1045]

Hey you all, I’m struggling configuring nextcloud. at the last step of the set up I am experiencing this message

Error

Error while trying to create admin user: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [1045] Access denied for user ‘nextcloud’@‘localhost’ (using password: YES)

I am running PHP and the databases on UBUNTU 22.04 TLS over a VM.
here the PHP conf,

‘instanceid’ => ‘',
‘passwordsalt’ => '
',
‘secret’ => '
*******’,
‘trusted_domains’ =>
array (
0 => ‘X.X.X.X’,
),
‘datadirectory’ => ‘/var/www/html/data’,
‘dbtype’ => ‘mysql’,
‘version’ => ‘25.0.2.3’,
‘overwrite.cli.url’ => ‘http://X.X.X.X’,
‘dbname’ => ‘nextcloud’,
‘dbhost’ => ‘localhost’,
‘dbport’ => ‘’,
‘dbtableprefix’ => ‘oc_’,
‘dbuser’ => ‘nextcloud’,
‘dbpassword’ => XXXXXXXX;',
‘mysql.utf8mb4’ => true,

here mariadb conf

CREATE USER ‘nextcloud’@‘localhost’ IDENTIFIED BY ‘XXXXXXX’;
CREATE DATABASE IF NOT EXISTS nextcloud CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
GRANT ALL PRIVILEGES ON nextcloud.* TO ‘nextcloud’@‘localhost’;
FLUSH PRIVILEGES;
quit;

Thank you