{"id":24170,"date":"2026-05-27T14:15:48","date_gmt":"2026-05-27T12:15:48","guid":{"rendered":"https:\/\/kunskap.websupport.se\/kb\/migrating-upgrading-mysql-and-mariadb-databases\/"},"modified":"2026-05-27T14:25:39","modified_gmt":"2026-05-27T12:25:39","slug":"migrating-upgrading-mysql-and-mariadb-databases","status":"publish","type":"ht_kb","link":"https:\/\/kunskap.websupport.se\/en\/kb\/migrating-upgrading-mysql-and-mariadb-databases\/","title":{"rendered":"Migrating \/ Upgrading MySQL and MariaDB Databases"},"content":{"rendered":"\n<h4 class=\"wp-block-heading\"><strong><br>Migrating \/ Upgrading MySQL and MariaDB Databases<\/strong><\/h4>\n\n\n\n<p>Migrating or upgrading your database is straightforward with our control panel. The process has two steps: create a copy of your database, then update your website&#8217;s configuration file.<\/p>\n\n\n\n<p>1. Log in to the control panel.<\/p>\n\n\n\n<p>2. Under Services, click the domain whose database you want to migrate.<\/p>\n\n\n\n<p>3. In the left menu, go to Advanced Configuration \u2192 Databases.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"292\" height=\"721\" src=\"https:\/\/kunskap.websupport.se\/app\/uploads\/sites\/4\/2026\/05\/image-1.png\" alt=\"\" class=\"wp-image-24191\" srcset=\"https:\/\/kunskap.websupport.se\/app\/uploads\/sites\/4\/2026\/05\/image-1.png 292w, https:\/\/kunskap.websupport.se\/app\/uploads\/sites\/4\/2026\/05\/image-1-20x50.png 20w, https:\/\/kunskap.websupport.se\/app\/uploads\/sites\/4\/2026\/05\/image-1-24x60.png 24w, https:\/\/kunskap.websupport.se\/app\/uploads\/sites\/4\/2026\/05\/image-1-40x100.png 40w\" sizes=\"auto, (max-width: 292px) 100vw, 292px\" \/><\/figure>\n\n\n\n<p>4. Click the three-dot menu (\u00b7\u00b7\u00b7) next to the database you want to upgrade, then select Duplicate.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"783\" height=\"468\" src=\"https:\/\/kunskap.websupport.se\/app\/uploads\/sites\/4\/2026\/05\/image-2-783x468.png\" alt=\"\" class=\"wp-image-24185\" srcset=\"https:\/\/kunskap.websupport.se\/app\/uploads\/sites\/4\/2026\/05\/image-2-783x468.png 783w, https:\/\/kunskap.websupport.se\/app\/uploads\/sites\/4\/2026\/05\/image-2-300x179.png 300w, https:\/\/kunskap.websupport.se\/app\/uploads\/sites\/4\/2026\/05\/image-2-768x459.png 768w, https:\/\/kunskap.websupport.se\/app\/uploads\/sites\/4\/2026\/05\/image-2-50x30.png 50w, https:\/\/kunskap.websupport.se\/app\/uploads\/sites\/4\/2026\/05\/image-2-60x36.png 60w, https:\/\/kunskap.websupport.se\/app\/uploads\/sites\/4\/2026\/05\/image-2-100x60.png 100w, https:\/\/kunskap.websupport.se\/app\/uploads\/sites\/4\/2026\/05\/image-2.png 1199w\" sizes=\"auto, (max-width: 783px) 100vw, 783px\" \/><\/figure>\n\n\n\n<p>5. Confirm when prompted \u2014 a backup of the current database state is created automatically before the copy is set up.<\/p>\n\n\n\n<p>6. Select the database version you need \u2014 you can choose a higher version than the current one. You can also change the default character set if needed.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"783\" height=\"594\" src=\"https:\/\/kunskap.websupport.se\/app\/uploads\/sites\/4\/2026\/05\/image-783x594.png\" alt=\"\" class=\"wp-image-24197\" srcset=\"https:\/\/kunskap.websupport.se\/app\/uploads\/sites\/4\/2026\/05\/image-783x594.png 783w, https:\/\/kunskap.websupport.se\/app\/uploads\/sites\/4\/2026\/05\/image-300x228.png 300w, https:\/\/kunskap.websupport.se\/app\/uploads\/sites\/4\/2026\/05\/image-768x583.png 768w, https:\/\/kunskap.websupport.se\/app\/uploads\/sites\/4\/2026\/05\/image-50x38.png 50w, https:\/\/kunskap.websupport.se\/app\/uploads\/sites\/4\/2026\/05\/image-60x46.png 60w, https:\/\/kunskap.websupport.se\/app\/uploads\/sites\/4\/2026\/05\/image-100x76.png 100w, https:\/\/kunskap.websupport.se\/app\/uploads\/sites\/4\/2026\/05\/image.png 1164w\" sizes=\"auto, (max-width: 783px) 100vw, 783px\" \/><\/figure>\n\n\n\n<p>7. Keep the auto-generated database name or enter your own. Generate a password or enter a custom one.<\/p>\n\n\n\n<p>8. Click Create to finish.<\/p>\n\n\n\n<p>The copy will be ready within 10 minutes and is immediately available for login and use. Your original database remains unchanged.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity\" \/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Update your website&#8217;s configuration files<\/strong><\/h4>\n\n\n\n<p><br>Once the copy is ready, update your website&#8217;s configuration files to point to the new database. You&#8217;ll need to change the following:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Database name<\/li>\n\n\n\n<li>Database username<\/li>\n\n\n\n<li>Database password<\/li>\n\n\n\n<li>Server name \/ database host (hostname)<\/li>\n<\/ul>\n\n\n\n<p>You&#8217;ll find these details in the control panel under Databases \u2014 click the database name to view the connection information. The password was set when the database was created; you can change it in WebAdmin if needed.<\/p>\n\n\n\n<p>Connection example with explicit character encoding:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$connection = new PDO(\"mysql:host=HOSTNAME;port=33XX;dbname=dbnamn;charset=utf8\", \"dbnamn\", \"ditt_l\u00f6senord\", array(PDO::MYSQL_ATTR_INIT_COMMAND =&gt; \"SET NAMES 'utf8'\"));<\/pre>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Hostnames and ports<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>MySQL 5.7 \u2013 mysql57.websupport.se:3311<\/li>\n\n\n\n<li>MySQL 8.0 \u2013 mysql80.websupport.se:3314<\/li>\n\n\n\n<li>MariaDB 10.1 \u2013 mariadb101.websupport.se:3312<\/li>\n\n\n\n<li>MariaDB 10.3 \u2013 mariadb103.websupport.se:3313<\/li>\n\n\n\n<li>PostgreSQL 9.0 \/ 10.0 \u2013 postgresql.websupport.se:5432<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity\" \/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Where to find config files in common CMS platforms<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>WordPress<\/strong> \u2013 the config file is wp-config.php (common path: \/web\/wp-config.php).<\/li>\n\n\n\n<li><strong>Joomla<\/strong> \u2013 the config file is configuration.php (common path: \/web\/configuration.php).<\/li>\n\n\n\n<li><strong>PrestaShop<\/strong> \u2013 the config file is settings.inc.php in the config folder (common path: \/web\/config\/settings.inc.php). Newer versions: web\/app\/config\/parameters.php.<\/li>\n\n\n\n<li><strong>Drupal<\/strong> \u2013 the config file is settings.php in the sites\/default folder (common path: \/web\/sites\/default\/settings.php).<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Migrating \/ Upgrading MySQL and MariaDB Databases Migrating or upgrading your database is straightforward with our control panel. The process has two steps: create a copy of your database, then update your website&#8217;s configuration file. 1. Log in to the control panel. 2. Under Services, click the domain whose database&#8230;<\/p>\n","protected":false},"author":8,"template":"","format":"standard","meta":{"footnotes":""},"ht-kb-category":[572],"ht-kb-tag":[],"class_list":["post-24170","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-database"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Migrating \/ Upgrading MySQL and MariaDB Databases - Websupport kunskapsdatabas<\/title>\n<meta name=\"description\" content=\"Migrating or upgrading your database is straightforward with our control panel. The process has two steps: create a copy of your database, then update your website&#039;s configuration file.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/kunskap.websupport.se\/en\/kb\/migrating-upgrading-mysql-and-mariadb-databases\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Migrating \/ Upgrading MySQL and MariaDB Databases - Websupport kunskapsdatabas\" \/>\n<meta property=\"og:description\" content=\"Migrating or upgrading your database is straightforward with our control panel. The process has two steps: create a copy of your database, then update your website&#039;s configuration file.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/kunskap.websupport.se\/en\/kb\/migrating-upgrading-mysql-and-mariadb-databases\/\" \/>\n<meta property=\"og:site_name\" content=\"Websupport kunskapsdatabas\" \/>\n<meta property=\"article:modified_time\" content=\"2026-05-27T12:25:39+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/kunskap.websupport.se\/app\/uploads\/sites\/4\/2026\/05\/image-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"292\" \/>\n\t<meta property=\"og:image:height\" content=\"721\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/kunskap.websupport.se\\\/en\\\/kb\\\/migrating-upgrading-mysql-and-mariadb-databases\\\/\",\"url\":\"https:\\\/\\\/kunskap.websupport.se\\\/en\\\/kb\\\/migrating-upgrading-mysql-and-mariadb-databases\\\/\",\"name\":\"Migrating \\\/ Upgrading MySQL and MariaDB Databases - Websupport kunskapsdatabas\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/kunskap.websupport.se\\\/en\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/kunskap.websupport.se\\\/en\\\/kb\\\/migrating-upgrading-mysql-and-mariadb-databases\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/kunskap.websupport.se\\\/en\\\/kb\\\/migrating-upgrading-mysql-and-mariadb-databases\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/kunskap.websupport.se\\\/app\\\/uploads\\\/sites\\\/4\\\/2026\\\/05\\\/image-1.png\",\"datePublished\":\"2026-05-27T12:15:48+00:00\",\"dateModified\":\"2026-05-27T12:25:39+00:00\",\"description\":\"Migrating or upgrading your database is straightforward with our control panel. The process has two steps: create a copy of your database, then update your website's configuration file.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/kunskap.websupport.se\\\/en\\\/kb\\\/migrating-upgrading-mysql-and-mariadb-databases\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/kunskap.websupport.se\\\/en\\\/kb\\\/migrating-upgrading-mysql-and-mariadb-databases\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/kunskap.websupport.se\\\/en\\\/kb\\\/migrating-upgrading-mysql-and-mariadb-databases\\\/#primaryimage\",\"url\":\"https:\\\/\\\/kunskap.websupport.se\\\/app\\\/uploads\\\/sites\\\/4\\\/2026\\\/05\\\/image-1.png\",\"contentUrl\":\"https:\\\/\\\/kunskap.websupport.se\\\/app\\\/uploads\\\/sites\\\/4\\\/2026\\\/05\\\/image-1.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/kunskap.websupport.se\\\/en\\\/kb\\\/migrating-upgrading-mysql-and-mariadb-databases\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/kunskap.websupport.se\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Migrating \\\/ Upgrading MySQL and MariaDB Databases\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/kunskap.websupport.se\\\/en\\\/#website\",\"url\":\"https:\\\/\\\/kunskap.websupport.se\\\/en\\\/\",\"name\":\"Websupport kunskapsdatabas\",\"description\":\"Websupport kunskapsdatabas\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/kunskap.websupport.se\\\/en\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Migrating \/ Upgrading MySQL and MariaDB Databases - Websupport kunskapsdatabas","description":"Migrating or upgrading your database is straightforward with our control panel. The process has two steps: create a copy of your database, then update your website's configuration file.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/kunskap.websupport.se\/en\/kb\/migrating-upgrading-mysql-and-mariadb-databases\/","og_locale":"en_US","og_type":"article","og_title":"Migrating \/ Upgrading MySQL and MariaDB Databases - Websupport kunskapsdatabas","og_description":"Migrating or upgrading your database is straightforward with our control panel. The process has two steps: create a copy of your database, then update your website's configuration file.","og_url":"https:\/\/kunskap.websupport.se\/en\/kb\/migrating-upgrading-mysql-and-mariadb-databases\/","og_site_name":"Websupport kunskapsdatabas","article_modified_time":"2026-05-27T12:25:39+00:00","og_image":[{"width":292,"height":721,"url":"https:\/\/kunskap.websupport.se\/app\/uploads\/sites\/4\/2026\/05\/image-1.png","type":"image\/png"}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/kunskap.websupport.se\/en\/kb\/migrating-upgrading-mysql-and-mariadb-databases\/","url":"https:\/\/kunskap.websupport.se\/en\/kb\/migrating-upgrading-mysql-and-mariadb-databases\/","name":"Migrating \/ Upgrading MySQL and MariaDB Databases - Websupport kunskapsdatabas","isPartOf":{"@id":"https:\/\/kunskap.websupport.se\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/kunskap.websupport.se\/en\/kb\/migrating-upgrading-mysql-and-mariadb-databases\/#primaryimage"},"image":{"@id":"https:\/\/kunskap.websupport.se\/en\/kb\/migrating-upgrading-mysql-and-mariadb-databases\/#primaryimage"},"thumbnailUrl":"https:\/\/kunskap.websupport.se\/app\/uploads\/sites\/4\/2026\/05\/image-1.png","datePublished":"2026-05-27T12:15:48+00:00","dateModified":"2026-05-27T12:25:39+00:00","description":"Migrating or upgrading your database is straightforward with our control panel. The process has two steps: create a copy of your database, then update your website's configuration file.","breadcrumb":{"@id":"https:\/\/kunskap.websupport.se\/en\/kb\/migrating-upgrading-mysql-and-mariadb-databases\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/kunskap.websupport.se\/en\/kb\/migrating-upgrading-mysql-and-mariadb-databases\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/kunskap.websupport.se\/en\/kb\/migrating-upgrading-mysql-and-mariadb-databases\/#primaryimage","url":"https:\/\/kunskap.websupport.se\/app\/uploads\/sites\/4\/2026\/05\/image-1.png","contentUrl":"https:\/\/kunskap.websupport.se\/app\/uploads\/sites\/4\/2026\/05\/image-1.png"},{"@type":"BreadcrumbList","@id":"https:\/\/kunskap.websupport.se\/en\/kb\/migrating-upgrading-mysql-and-mariadb-databases\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/kunskap.websupport.se\/"},{"@type":"ListItem","position":2,"name":"Migrating \/ Upgrading MySQL and MariaDB Databases"}]},{"@type":"WebSite","@id":"https:\/\/kunskap.websupport.se\/en\/#website","url":"https:\/\/kunskap.websupport.se\/en\/","name":"Websupport kunskapsdatabas","description":"Websupport kunskapsdatabas","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/kunskap.websupport.se\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/kunskap.websupport.se\/en\/wp-json\/wp\/v2\/ht-kb\/24170","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kunskap.websupport.se\/en\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/kunskap.websupport.se\/en\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/kunskap.websupport.se\/en\/wp-json\/wp\/v2\/users\/8"}],"version-history":[{"count":3,"href":"https:\/\/kunskap.websupport.se\/en\/wp-json\/wp\/v2\/ht-kb\/24170\/revisions"}],"predecessor-version":[{"id":24203,"href":"https:\/\/kunskap.websupport.se\/en\/wp-json\/wp\/v2\/ht-kb\/24170\/revisions\/24203"}],"wp:attachment":[{"href":"https:\/\/kunskap.websupport.se\/en\/wp-json\/wp\/v2\/media?parent=24170"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/kunskap.websupport.se\/en\/wp-json\/wp\/v2\/ht-kb-category?post=24170"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/kunskap.websupport.se\/en\/wp-json\/wp\/v2\/ht-kb-tag?post=24170"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}