{"id":13745,"date":"2017-02-06T16:13:31","date_gmt":"2017-02-06T15:13:31","guid":{"rendered":"https:\/\/supporttest.hemsida.eu\/artikel\/hur-skapar-jag-databaser-i-cpanel\/"},"modified":"2026-02-05T13:34:38","modified_gmt":"2026-02-05T12:34:38","slug":"how-do-i-create-databases-via-cpanel","status":"publish","type":"ht_kb","link":"https:\/\/supporttest.hemsida.eu\/en\/artikel\/how-do-i-create-databases-via-cpanel\/","title":{"rendered":"How do I create databases via cPanel?"},"content":{"rendered":"\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon is-style-info\"><a href=\"https:\/\/supporttest.hemsida.eu\/en\/artikel\/which-version-of-mysql-do-your-web-hosting-servers-run\/\" data-type=\"ht_kb\" data-id=\"9513\" target=\"_blank\" rel=\"noreferrer noopener\">Our servers run MariaDB<\/a>, but cPanel still refers to the database functions as MySQL, which is why it is stated as such in the interface. For the sake of accuracy, however, the instructions here will refer to the database engine as MariaDB.<\/p>\n\n\n\n<p>To create databases, begin by <a href=\"https:\/\/supporttest.hemsida.eu\/en\/artikel\/how-do-i-login-to-cpanel\/\" data-type=\"ht_kb\" data-id=\"4236\" target=\"_blank\" rel=\"noreferrer noopener\">logging on to cPanel<\/a>. Once there, you can create databases in two ways: either via a wizard accessible via the icon <code>MySQL Database Wizard<\/code>, or manually via the icon <code>MySQL Databases<\/code>.<\/p>\n\n\n\n<p>The manual method might be suitable if you already have a database for which you want to create an additional user. Otherwise, the guided method will be quicker.<\/p>\n\n\n\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon is-style-alert\"><strong>External database access<\/strong><br><br>If you need to access the database from another server than the one you&#8217;ve created it at, you need to allow remote access. Please refer to <a rel=\"noreferrer noopener\" href=\"https:\/\/supporttest.hemsida.eu\/en\/artikel\/how-do-i-enable-remote-access-to-my-databases\/\" data-type=\"ht_kb\" data-id=\"10175\" target=\"_blank\">these instructions<\/a> for more information.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Via the MySQL Database Wizard<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Begin by <a rel=\"noreferrer noopener\" href=\"https:\/\/supporttest.hemsida.eu\/en\/artikel\/how-do-i-login-to-cpanel\/\" data-type=\"ht_kb\" data-id=\"4236\" target=\"_blank\">logging on to cPanel<\/a>.<\/li>\n\n\n\n<li>Click the icon <code>MySQL Database Wizard<\/code> under <code>Databases<\/code>.<br><a href=\"https:\/\/supporttest.hemsida.eu\/wp-content\/uploads\/2017\/02\/cpanel_icon_mysql_database_wizard-1.png\"><img loading=\"lazy\" decoding=\"async\" width=\"779\" height=\"197\" class=\"wp-image-18935\" style=\"width: 779px;\" src=\"https:\/\/supporttest.hemsida.eu\/wp-content\/uploads\/2017\/02\/cpanel_icon_mysql_database_wizard-1.png\" alt=\"\" srcset=\"https:\/\/supporttest.hemsida.eu\/wp-content\/uploads\/2017\/02\/cpanel_icon_mysql_database_wizard-1.png 779w, https:\/\/supporttest.hemsida.eu\/wp-content\/uploads\/2017\/02\/cpanel_icon_mysql_database_wizard-1-300x76.png 300w, https:\/\/supporttest.hemsida.eu\/wp-content\/uploads\/2017\/02\/cpanel_icon_mysql_database_wizard-1-768x194.png 768w, https:\/\/supporttest.hemsida.eu\/wp-content\/uploads\/2017\/02\/cpanel_icon_mysql_database_wizard-1-50x13.png 50w, https:\/\/supporttest.hemsida.eu\/wp-content\/uploads\/2017\/02\/cpanel_icon_mysql_database_wizard-1-60x15.png 60w, https:\/\/supporttest.hemsida.eu\/wp-content\/uploads\/2017\/02\/cpanel_icon_mysql_database_wizard-1-100x25.png 100w\" sizes=\"auto, (max-width: 779px) 100vw, 779px\" \/><\/a><\/li>\n\n\n\n<li>First, enter a name for the database in <code>New Database<\/code>. The name will always be based on your cPanel username, so you select the last part of the name here. In our example, we can select the part of the name following <code>exempel_<\/code>. Then click <code>Next Step<\/code>.<br><a href=\"https:\/\/supporttest.hemsida.eu\/wp-content\/uploads\/2017\/02\/cpanel_mysql_database_wizard_database_name-1.png\"><img loading=\"lazy\" decoding=\"async\" width=\"529\" height=\"190\" class=\"wp-image-13755\" style=\"width: 529px;\" src=\"https:\/\/supporttest.hemsida.eu\/wp-content\/uploads\/2017\/02\/cpanel_mysql_database_wizard_database_name-1.png\" alt=\"\"><\/a><\/li>\n\n\n\n<li>Then, it&#8217;s time to create a user with access to the database. Choose a <code>Username<\/code> and a <code>Password<\/code>. The database username will always begin with your cPanel username (just like the database name). Enter the password twice and click <code>Create user<\/code>.<br><a href=\"https:\/\/supporttest.hemsida.eu\/wp-content\/uploads\/2017\/02\/cpanel_mysql_database_wizard_database_user_pw.png\"><img loading=\"lazy\" decoding=\"async\" width=\"896\" height=\"471\" class=\"wp-image-13752\" style=\"width: 896px;\" src=\"https:\/\/supporttest.hemsida.eu\/wp-content\/uploads\/2017\/02\/cpanel_mysql_database_wizard_database_user_pw.png\" alt=\"\"><\/a><\/li>\n\n\n\n<li>Grant the user privileges on the database. Most often you wish to grant all. Then click <code>Next Step<\/code>.<br><a href=\"https:\/\/supporttest.hemsida.eu\/wp-content\/uploads\/2017\/02\/cpanel_mysql_database_wizard_database_privileges.png\"><img loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"838\" class=\"wp-image-13758\" style=\"width: 750px;\" src=\"https:\/\/supporttest.hemsida.eu\/wp-content\/uploads\/2017\/02\/cpanel_mysql_database_wizard_database_privileges.png\" alt=\"\"><\/a><\/li>\n\n\n\n<li>And you&#8217;re done! You may now start using the database with the credentials you selected above.<br><a href=\"https:\/\/supporttest.hemsida.eu\/wp-content\/uploads\/2017\/02\/cpanel_mysql_database_wizard_database_done.png\"><img loading=\"lazy\" decoding=\"async\" width=\"569\" height=\"101\" class=\"wp-image-13761\" style=\"width: 569px;\" src=\"https:\/\/supporttest.hemsida.eu\/wp-content\/uploads\/2017\/02\/cpanel_mysql_database_wizard_database_done.png\" alt=\"\"><\/a><\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">Manually<\/h2>\n\n\n\n<p>Begin by <a href=\"https:\/\/supporttest.hemsida.eu\/en\/artikel\/how-do-i-login-to-cpanel\/\" data-type=\"ht_kb\" data-id=\"4236\" target=\"_blank\" rel=\"noreferrer noopener\">logging on to cPanel<\/a>.<\/p>\n\n\n\n<p>Once there, click the icon <code>MySQL Databases<\/code> under <code>Databases<\/code>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-style-default\"><a href=\"https:\/\/supporttest.hemsida.eu\/wp-content\/uploads\/2017\/02\/cpanel_icon_mysql_databases-1.png\"><img loading=\"lazy\" decoding=\"async\" width=\"753\" height=\"197\" src=\"https:\/\/supporttest.hemsida.eu\/wp-content\/uploads\/2017\/02\/cpanel_icon_mysql_databases-1.png\" alt=\"\" class=\"wp-image-18938\" srcset=\"https:\/\/supporttest.hemsida.eu\/wp-content\/uploads\/2017\/02\/cpanel_icon_mysql_databases-1.png 753w, https:\/\/supporttest.hemsida.eu\/wp-content\/uploads\/2017\/02\/cpanel_icon_mysql_databases-1-300x78.png 300w, https:\/\/supporttest.hemsida.eu\/wp-content\/uploads\/2017\/02\/cpanel_icon_mysql_databases-1-50x13.png 50w, https:\/\/supporttest.hemsida.eu\/wp-content\/uploads\/2017\/02\/cpanel_icon_mysql_databases-1-60x16.png 60w, https:\/\/supporttest.hemsida.eu\/wp-content\/uploads\/2017\/02\/cpanel_icon_mysql_databases-1-100x26.png 100w\" sizes=\"auto, (max-width: 753px) 100vw, 753px\" \/><\/a><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Creating a database<\/h3>\n\n\n\n<p>First, you need to create a database and select a name for it under <code>Create New Database<\/code>. The name will always be based on your cPanel username, so you select the last part of the name here. In our example, we can select the part of the name following <code>exempel_<\/code>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-style-default\"><a href=\"https:\/\/supporttest.hemsida.eu\/wp-content\/uploads\/2017\/02\/cpanel_mysql_create_database.png\"><img loading=\"lazy\" decoding=\"async\" width=\"403\" height=\"169\" src=\"https:\/\/supporttest.hemsida.eu\/wp-content\/uploads\/2017\/02\/cpanel_mysql_create_database.png\" alt=\"\" class=\"wp-image-13770\"\/><\/a><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Creating a database user<\/h3>\n\n\n\n<p>Now, create a database user unless you already have one from earlier. Under <code>Add New User<\/code> you can enter the credentials for a new database user, then click <code>Create User<\/code>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-style-default\"><a href=\"https:\/\/supporttest.hemsida.eu\/wp-content\/uploads\/2017\/02\/cpanel_mysql_create_user.png\"><img loading=\"lazy\" decoding=\"async\" width=\"574\" height=\"432\" src=\"https:\/\/supporttest.hemsida.eu\/wp-content\/uploads\/2017\/02\/cpanel_mysql_create_user.png\" alt=\"\" class=\"wp-image-13768\"\/><\/a><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Add a user to a database<\/h3>\n\n\n\n<p>Finally, you need to add the user to the database you&#8217;ve created. Under <code>Add User To Database<\/code>, you select the user and the database you wish to connect, then click the <code>Add<\/code> button.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-style-default\"><a href=\"https:\/\/supporttest.hemsida.eu\/wp-content\/uploads\/2017\/02\/cpanel_mysql_add_user_to_database.png\"><img loading=\"lazy\" decoding=\"async\" width=\"385\" height=\"233\" src=\"https:\/\/supporttest.hemsida.eu\/wp-content\/uploads\/2017\/02\/cpanel_mysql_add_user_to_database.png\" alt=\"\" class=\"wp-image-13773\"\/><\/a><\/figure>\n\n\n\n<p>Now you will get to grant privileges for the user on the database. The most common is to grant all privileges, <em>e.g.<\/em> in various CMSes such as WordPress and Joomla, you&#8217;ll need to grant all for everything to work properly. You can read more about MySQL privileges <a href=\"https:\/\/mariadb.com\/docs\/server\/security\/user-account-management\/roles\" target=\"_blank\" rel=\"noreferrer noopener\">here<\/a>. Confirm your choices with the <code>Make Changes<\/code> button. Your database and user are now ready to be used.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-style-default\"><a href=\"https:\/\/supporttest.hemsida.eu\/wp-content\/uploads\/2017\/02\/cpanel_mysql_grant_privileges.png\"><img loading=\"lazy\" decoding=\"async\" width=\"646\" height=\"743\" src=\"https:\/\/supporttest.hemsida.eu\/wp-content\/uploads\/2017\/02\/cpanel_mysql_grant_privileges.png\" alt=\"\" class=\"wp-image-13775\"\/><\/a><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>To create databases, begin by logging on to cPanel. Once there, you can create databases in two ways: either via a wizard accessible via the icon MySQL Database Wizard, or manually via the icon MySQL Databases. The manual method might be suitable if you already have a database for which&#8230;<\/p>\n","protected":false},"author":12,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"ht-kb-category":[197],"ht-kb-tag":[],"class_list":["post-13745","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-databases"],"acf":[],"_links":{"self":[{"href":"https:\/\/supporttest.hemsida.eu\/en\/wp-json\/wp\/v2\/ht-kb\/13745","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/supporttest.hemsida.eu\/en\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/supporttest.hemsida.eu\/en\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/supporttest.hemsida.eu\/en\/wp-json\/wp\/v2\/users\/12"}],"replies":[{"embeddable":true,"href":"https:\/\/supporttest.hemsida.eu\/en\/wp-json\/wp\/v2\/comments?post=13745"}],"version-history":[{"count":18,"href":"https:\/\/supporttest.hemsida.eu\/en\/wp-json\/wp\/v2\/ht-kb\/13745\/revisions"}],"predecessor-version":[{"id":24787,"href":"https:\/\/supporttest.hemsida.eu\/en\/wp-json\/wp\/v2\/ht-kb\/13745\/revisions\/24787"}],"wp:attachment":[{"href":"https:\/\/supporttest.hemsida.eu\/en\/wp-json\/wp\/v2\/media?parent=13745"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/supporttest.hemsida.eu\/en\/wp-json\/wp\/v2\/ht-kb-category?post=13745"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/supporttest.hemsida.eu\/en\/wp-json\/wp\/v2\/ht-kb-tag?post=13745"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}