{"id":1998,"date":"2021-11-16T14:07:00","date_gmt":"2021-11-16T14:07:00","guid":{"rendered":"https:\/\/blog.hostinger.io\/fr\/support\/2021\/11\/16\/5496540-comment-mettre-a-niveau-modifier-mysql-mariadb-sur-un-vps-chez-hostinger\/"},"modified":"2025-08-26T21:40:33","modified_gmt":"2025-08-26T21:40:33","slug":"5496540-comment-mettre-a-niveau-modifier-mysql-mariadb-sur-un-vps-chez-hostinger","status":"publish","type":"post","link":"https:\/\/www.hostinger.com\/fr\/support\/5496540-comment-mettre-a-niveau-modifier-mysql-mariadb-sur-un-vps-chez-hostinger\/","title":{"rendered":"Comment Mettre \u00e0 Niveau\/Modifier MySQL (MariaDB) sur un VPS chez Hostinger"},"content":{"rendered":"<p class=\"no-margin\">Il peut arriver que vous ayez besoin de mettre &agrave; niveau ou de r&eacute;trograder le paquetage MySQL MariaDB sur votre VPS. Par exemple, lorsque la version de MariaDB, actuellement install&eacute;e sur votre serveur, n&rsquo;est pas support&eacute;e par le SGC de votre site web.<\/p><p class=\"no-margin\" style=\"color: #565867\">\n<\/p><p class=\"no-margin\" style=\"color: #565867\">Dans les exemples ci-dessous, nous allons r&eacute;trograder de MariaDB 10.5 &agrave; MariaDB 10.4 &ndash; vous pourrez effectuer des changements vers n&rsquo;importe quelle version en rempla&ccedil;ant la version dans les commandes SSH.<\/p><p class=\"no-margin\" style=\"color: #565867\">\n<\/p><h2 id=\"h_5fe8bdcf4f\" style=\"color: #3a3c4c\">&Eacute;tape 1 &ndash; Sauvegardez votre base de donn&eacute;es<\/h2><p class=\"no-margin\" style=\"color: #565867\">Tout d&rsquo;abord, connectez-vous &agrave; votre serveur <b>en utilisant SSH<\/b> et v&eacute;rifiez les <b>mots de passe<\/b> CyberPanel et Root MySQL. Ceci peut &ecirc;tre fait en ex&eacute;cutant :<\/p><pre><code>cat .db_password<\/code><\/pre><p class=\"no-margin\" style=\"color: #565867\">Puis cr&eacute;ez une <b>nouvelle sauvegarde<\/b> :<\/p><pre><code>mysqldump -u root -p --all-databases &gt; databasedump.sql<\/code><\/pre><p class=\"no-margin\" style=\"color: #565867\">Utilisez le mot de passe du fichier .db_password.<\/p><p class=\"no-margin\" style=\"color: #565867\">\n<\/p><h2 id=\"h_957ddf68b9\" style=\"color: #3a3c4c\">&Eacute;tape 2 &ndash; Changer la version de MariaDB<\/h2><p class=\"no-margin\" style=\"color: #565867\">Quand on a une sauvegarde, on peut <b>supprimer <\/b>la version de MariaDB.<\/p><p class=\"no-margin\" style=\"color: #565867\">Ensuite, ajoutez le r&eacute;pertoire YUM de MariaDB : vim<\/p><pre><code>\/etc\/yum.repos.d\/MariaDB.repo<\/code><\/pre><p class=\"no-margin\">et <b>mettez &agrave; jour le fichier<\/b> :<\/p><pre><code>[mariadb]<br>name = MariaDB<br>baseurl = http:\/\/yum.mariadb.org\/10.4\/centos7-amd64<br>gpgkey=https:\/\/yum.mariadb.org\/RPM-GPG-KEY-MariaDB gpgcheck=1<\/code><\/pre><p class=\"no-margin\" style=\"color: #565867\">Apr&egrave;s cela, mettez &agrave; jour l&rsquo;<b>index du cache de yum<\/b> :<\/p><pre><code>yum makecache fast<\/code><\/pre><p class=\"no-margin\" style=\"color: #565867\">Et <b>installez la nouvelle version de MariaDB <\/b>:<\/p><pre><code>yum install MariaDB-server MariaDB-client<\/code><\/pre><p class=\"no-margin\" style=\"color: #565867\">N&rsquo;oubliez pas d&rsquo;<b>activer MariaDB<\/b> :<\/p><pre><code>systemctl start mariadb<\/code><\/pre><p class=\"no-margin\" style=\"color: #565867\">Et <b>commencez-la<\/b> :<\/p><pre><code>systemctl enable mariadb<\/code><\/pre><p class=\"no-margin\" style=\"color: #565867\">La touche finale &ndash; <b>s&eacute;curiser MariaDB<\/b> :<\/p><pre><code>mysql_secure_installation<\/code><\/pre><p class=\"no-margin\" style=\"color: #565867\">\n<\/p><p class=\"no-margin\" style=\"color: #565867\">Utilisez le m&ecirc;me mot de passe dans .db_password. Une version diff&eacute;rente de MariaDB (10.4 dans notre cas) devrait maintenant fonctionner, vous pouvez v&eacute;rifier avec <code>mysql --v<\/code>:<\/p><p class=\"no-margin\" style=\"color: #565867\">\n<\/p><div class=\"intercom-container\"><img decoding=\"async\" src=\"\/fr\/support\/wp-content\/uploads\/sites\/56\/2021\/11\/c7756fd8-1972-4a48-9600-9129f431f260.jpg\" alt=\"image\"><\/div><h2 id=\"h_b2677446ad\">&Eacute;tape 3 &ndash; Importez votre base de donn&eacute;es<\/h2><p class=\"no-margin\" style=\"color: #565867\">Enfin, <b>importez <\/b>la sauvegarde de votre base de donn&eacute;es :<\/p><pre><code>mysql -u root -p root &lt; databasedump.sql<\/code><\/pre><p class=\"no-margin\" style=\"color: #565867\">Et <b>red&eacute;marrez <\/b>MariaDB :<\/p><pre><code>systemctl restart mariadb<\/code><\/pre><p class=\"no-margin\" style=\"color: #565867\">\n<\/p><p class=\"no-margin\" style=\"color: #565867\">C&rsquo;est tout, votre version de MariaDB a &eacute;t&eacute; mise &agrave; jour avec succ&egrave;s !<\/p><p class=\"no-margin\" style=\"color: #565867\">\n<\/p><p class=\"no-margin\" style=\"color: #565867\"><b>REMARQUE <\/b>:<\/p><ul>\n<li>\n<p class=\"no-margin\"><b><a href=\"https:\/\/mariadb.com\/kb\/en\/upgrading\/\" target=\"_blank\" class=\"intercom-content-link\" rel=\"noopener\">Documentation officielle sur la mise &agrave; jour de MariaDB<\/a><\/b><\/p>\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Mise \u00e0 jour et r\u00e9trogradation du paquet MySQL MariaDB sur le VPS CyberPanel<\/p>\n","protected":false},"author":581,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"include_on_kodee":true,"footnotes":""},"categories":[175],"tags":[],"class_list":["post-1998","post","type-post","status-publish","format-standard","hentry","category-cyberpanel-vps"],"hreflangs":[{"locale":"en-US","link":"https:\/\/www.hostinger.com\/support\/5496540-how-to-change-the-mariadb-version-on-cyberpanel-vps\/","default":1},{"locale":"es-ES","link":"https:\/\/www.hostinger.com\/es\/support\/5496540-como-actualizar-degradar-mysql-mariadb-en-vps-en-hostinger\/","default":0},{"locale":"fr-FR","link":"https:\/\/www.hostinger.com\/fr\/support\/5496540-comment-mettre-a-niveau-modifier-mysql-mariadb-sur-un-vps-chez-hostinger\/","default":0},{"locale":"id-ID","link":"https:\/\/www.hostinger.com\/id\/support\/5496540-bagaimana-cara-upgrade-downgrade-mysql-mariadb-di-vps-di-hostinger\/","default":0},{"locale":"pt-PT","link":"https:\/\/www.hostinger.com\/br\/support\/5496540-como-atualizar-ou-voltar-para-a-versao-anterior-do-mysql-mariadb-na-vps-hostinger\/","default":0}],"include_on_kodee":true,"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/fr\/support\/wp-json\/wp\/v2\/posts\/1998","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/fr\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/fr\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/fr\/support\/wp-json\/wp\/v2\/users\/581"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/fr\/support\/wp-json\/wp\/v2\/comments?post=1998"}],"version-history":[{"count":1,"href":"https:\/\/www.hostinger.com\/fr\/support\/wp-json\/wp\/v2\/posts\/1998\/revisions"}],"predecessor-version":[{"id":4811,"href":"https:\/\/www.hostinger.com\/fr\/support\/wp-json\/wp\/v2\/posts\/1998\/revisions\/4811"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/fr\/support\/wp-json\/wp\/v2\/media?parent=1998"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/fr\/support\/wp-json\/wp\/v2\/categories?post=1998"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/fr\/support\/wp-json\/wp\/v2\/tags?post=1998"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}