Invalid MySQL username and / or password You have to enter the data of an existing account and the account

It helps when trying to install the Nextcloud from the official website version 21.0.2 in .zip format when putting it and unzipping it in the root of my server, when opening it in the browser when I am going to configure it and enter all the data correctly it gives me the following error Invalid MySQL username and / or password You have to enter the data of an existing account and the account you are using is the root account, and if you are creating the database, when you try to do it via the console it gives the same error but I noticed that there is a line using a user that does not exist in my MySQL server that line says SQLSTATE [HY000] [1045] Access denied for user ‘oc_admin’ @ ‘localhost’ (using password: YES) referring to a user oc_admin which I have not placed in any form someone could tell me that I mean that.

Ayuda al intentar instalar el Nextcloud de la web oficial la versión 21.0.2 en formato .zip al ponerla y descomprimirla en la rais de mi servidor, al abrirlo en el navegador cuando lo voy a configurar e introduzco todos los datos correctamente me da el siguiente error Usuario y/o contraseña de MySQL no válidos Tienes que introducir los datos de una cuenta existente y la cuenta que esta usando es la del root además si está creando la base de datos, al intentarlo hacerlo vía consola da el mismo error pero me percate que hay una línea utilizando un usuario que no existe en mi servidor de MySQL dicha línea dice SQLSTATE[HY000] [1045] Access denied for user ‘oc_admin’@’localhost’ (using password: YES) haciendo alusión a un usuario oc_admin el cual yo no he colocado en ningún formulario alguien me podría decir que quiero decir eso.

Is this the first time you are installing Nextcloud? Does the mysql database exist already for Nextcloud?
It sounds like the default config file has a default user “'oc_admin” for the database. Check the config file and try changing it to match the mysql database which exists for your Nextcloud installation.

I already solved the problem I just had to put the data from the database server manually in the config.php file thanks anyway

Ya solucione el problema solo tuve que colocar los datos del servidor de bases de datos manualmente en el archivo config.php gracias igualmente

Hi, I am experiencing the same issues. Could you please provide some more detail or some further link? I am a brutal noob with Linux and cannot really follow…

You just have to edit the config.php file with your favorite text editor and check that the database user is correct. Previously, it happened to me that it put oc_admin as the default user to connect to the database, the only thing you have to do is to change the parameters and it should look like this, just modify things according to your installation, the example is from an installation of version 21.0.2.1 with a DB MYSQL server. I hope it will be useful to you:

<?php $CONFIG = array ( 'instanceid' => '', 'passwordsalt' => '', 'secret' => '', 'trusted_domains' => array ( 0 => '[YOUR DOMAIN]', ), 'datadirectory' => '[NEXTCLOUD FOLDER PATH]', 'dbtype' => 'mysql', 'version' => '21.0.2.1', 'overwrite.cli.url' => 'https://[YOUR DOMAIN]', 'dbname' => '[NAME OF YOUR DB]', 'dbhost' => '[YOUR DB SERVER ADDRESS]', 'dbport' => '[PORT DB SERVER]', 'dbtableprefix' => 'oc_', 'mysql.utf8mb4' => true, 'dbuser' => '[DB USER]', 'dbpassword' => '[DB PASSWORD]', 'installed' => true, );
1 Like