diff --git a/htdocs/install/etape5.php b/htdocs/install/etape5.php
index 2cea1d681b9..ececcc1fdbb 100644
--- a/htdocs/install/etape5.php
+++ b/htdocs/install/etape5.php
@@ -76,6 +76,10 @@ if ($_POST["action"] == "set" || $_POST["action"] == "upgrade")
print '
';
$error=0;
+
+ // on décode le mot de passe de la base si besoin
+ require_once(DOL_DOCUMENT_ROOT ."/lib/functions.inc.php");
+ if ($dolibarr_main_db_encrypted_pass) $dolibarr_main_db_pass = dolibarr_decode($dolibarr_main_db_encrypted_pass);
$conf->db->type = $dolibarr_main_db_type;
$conf->db->host = $dolibarr_main_db_host;
diff --git a/htdocs/install/upgrade.php b/htdocs/install/upgrade.php
index 9cb08358ae9..62a280e51fd 100644
--- a/htdocs/install/upgrade.php
+++ b/htdocs/install/upgrade.php
@@ -68,6 +68,10 @@ if (! isset($_GET["action"]) || $_GET["action"] == "upgrade")
print '';
$error=0;
+
+ // on décode le mot de passe de la base si besoin
+ require_once(DOL_DOCUMENT_ROOT ."/lib/functions.inc.php");
+ if ($dolibarr_main_db_encrypted_pass) $dolibarr_main_db_pass = dolibarr_decode($dolibarr_main_db_encrypted_pass);
$conf = new Conf();// on pourrait s'en passer
$conf->db->type = $dolibarr_main_db_type;
diff --git a/htdocs/install/upgrade2.php b/htdocs/install/upgrade2.php
index 329458a83fb..08b15d12d67 100644
--- a/htdocs/install/upgrade2.php
+++ b/htdocs/install/upgrade2.php
@@ -73,6 +73,10 @@ if (isset($_POST['action']) && $_POST['action'] == 'upgrade')
print ''.$langs->trans('DataMigration').'
';
print '';
+
+ // on décode le mot de passe de la base si besoin
+ require_once(DOL_DOCUMENT_ROOT ."/lib/functions.inc.php");
+ if ($dolibarr_main_db_encrypted_pass) $dolibarr_main_db_pass = dolibarr_decode($dolibarr_main_db_encrypted_pass);
$conf = new Conf();// on pourrait s'en passer
$conf->db->type = $dolibarr_main_db_type;