{"id":6456,"date":"2023-07-13T10:15:00","date_gmt":"2023-07-13T10:15:00","guid":{"rendered":"https:\/\/www.smarthost.au\/blog\/?p=6456"},"modified":"2024-06-18T13:13:45","modified_gmt":"2024-06-18T13:13:45","slug":"how-to-set-up-a-new-mysql-database","status":"publish","type":"post","link":"https:\/\/www.smarthost.au\/blog\/how-to-set-up-a-new-mysql-database","title":{"rendered":"How to set up a new MySQL database?"},"content":{"rendered":"\n<p><strong>sume that you already have a hosting with a cPanel management panel.<\/strong><\/p>\n\n\n\n<p><strong>If you are faced with choosing a proven hosting, <a href=\"https:\/\/www.smarthost.au\/compare-gold-ssd-hosting-plans-gold-ssd\" data-type=\"URL\" data-id=\"https:\/\/www.smarthost.eu\/compare-premium-ssd-hosting-plans\">compare our plans<\/a>. All descriptions in this guide are based on Smarthost.au hosting<\/strong><\/p>\n\n\n\n<p>To set up a new MySQL database, click on the &#8220;<strong>MySQL databases<\/strong>&#8221; button on the cPanel main screen.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"487\" src=\"https:\/\/www.smarthost.au\/blog\/wp-content\/uploads\/2024\/06\/B1.png\" alt=\"\" class=\"wp-image-6457\" srcset=\"https:\/\/www.smarthost.au\/blog\/wp-content\/uploads\/2024\/06\/B1.png 1024w, https:\/\/www.smarthost.au\/blog\/wp-content\/uploads\/2024\/06\/B1-300x143.png 300w, https:\/\/www.smarthost.au\/blog\/wp-content\/uploads\/2024\/06\/B1-768x365.png 768w, https:\/\/www.smarthost.au\/blog\/wp-content\/uploads\/2024\/06\/B1-520x247.png 520w, https:\/\/www.smarthost.au\/blog\/wp-content\/uploads\/2024\/06\/B1-740x352.png 740w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Then enter the name of the database you want to create (field 1, the name is arbitrary) and click on the &#8220;<strong>Create database<\/strong>&#8221; button (field 2).<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"274\" src=\"https:\/\/www.smarthost.au\/blog\/wp-content\/uploads\/2024\/06\/B2.png\" alt=\"\" class=\"wp-image-6458\" srcset=\"https:\/\/www.smarthost.au\/blog\/wp-content\/uploads\/2024\/06\/B2.png 1024w, https:\/\/www.smarthost.au\/blog\/wp-content\/uploads\/2024\/06\/B2-300x80.png 300w, https:\/\/www.smarthost.au\/blog\/wp-content\/uploads\/2024\/06\/B2-768x206.png 768w, https:\/\/www.smarthost.au\/blog\/wp-content\/uploads\/2024\/06\/B2-520x139.png 520w, https:\/\/www.smarthost.au\/blog\/wp-content\/uploads\/2024\/06\/B2-740x198.png 740w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>After the database is created, a notification will appear confirming successful creation. On this screen, click the &#8220;<strong>Back<\/strong>&#8221; button to return to the database management screen.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"212\" src=\"https:\/\/www.smarthost.au\/blog\/wp-content\/uploads\/2024\/06\/B3.png\" alt=\"\" class=\"wp-image-6459\" srcset=\"https:\/\/www.smarthost.au\/blog\/wp-content\/uploads\/2024\/06\/B3.png 1024w, https:\/\/www.smarthost.au\/blog\/wp-content\/uploads\/2024\/06\/B3-300x62.png 300w, https:\/\/www.smarthost.au\/blog\/wp-content\/uploads\/2024\/06\/B3-768x159.png 768w, https:\/\/www.smarthost.au\/blog\/wp-content\/uploads\/2024\/06\/B3-520x108.png 520w, https:\/\/www.smarthost.au\/blog\/wp-content\/uploads\/2024\/06\/B3-740x153.png 740w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>To create a new user in the database management panel, enter the desired name in the &#8220;<strong>Username<\/strong>&#8221; field (field 1).<\/p>\n\n\n\n<p>Fill in the &#8220;<strong>Password<\/strong>&#8221; field with the selected password, or click the &#8220;<strong>Generate password<\/strong>&#8221; button. Thanks to it, we will automatically generate a secure password, which we can then copy.<\/p>\n\n\n\n<p>After completing these fields, click on the &#8220;<strong>Create user<\/strong>&#8221; button (field 2).<\/p>\n\n\n\n<p>The next step is to assign the created user to the appropriate database. We do it in the database management panel under &#8220;<strong>Add user to database<\/strong>&#8220;.<\/p>\n\n\n\n<p>In the &#8220;<strong>User<\/strong>&#8221; field, select the user you want to assign to the database, and in the &#8220;<strong>Database<\/strong>&#8221; field, select the database to which the user is to be assigned. Then click on the &#8220;<strong>Add<\/strong>&#8221; button.<\/p>\n\n\n\n<p>In the next step of assigning a user to the database, select the permissions he should have. We do this by selecting appropriate check boxes. After selecting the desired permissions, click on the &#8220;<strong>Make changes<\/strong>&#8221; button.<\/p>\n\n\n\n<p>In the database control panel, in the &#8220;<strong>Current databases<\/strong>&#8221; section, we can see the databases we have created and the users assigned to them.<\/p>\n\n\n\n<p class=\"has-text-align-center\"><strong>Create a free test account on the Smarthost.au server and check how a properly configured mySQL database works:<\/strong><\/p>\n\n\n\n<p class=\"has-text-align-center\"><a href=\"https:\/\/www.smarthost.au\/gold-ssd-www-hosting-plan\">Create a test account, gold-ssd-www package<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>sume that you already have a hosting with a cPanel management panel. If you are faced with choosing a proven hosting, compare our plans. All descriptions in this guide are based on Smarthost.au hosting To<a class=\"read-more\" href=\"https:\/\/www.smarthost.au\/blog\/how-to-set-up-a-new-mysql-database\">Continue reading<\/a><\/p>\n","protected":false},"author":16,"featured_media":6462,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[262,1144,97],"tags":[117,99,295],"class_list":["post-6456","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cpanel-hr","category-databases","category-mysql","tag-cpanel","tag-database","tag-mysql-hr"],"_links":{"self":[{"href":"https:\/\/www.smarthost.au\/blog\/wp-json\/wp\/v2\/posts\/6456","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.smarthost.au\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.smarthost.au\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.smarthost.au\/blog\/wp-json\/wp\/v2\/users\/16"}],"replies":[{"embeddable":true,"href":"https:\/\/www.smarthost.au\/blog\/wp-json\/wp\/v2\/comments?post=6456"}],"version-history":[{"count":2,"href":"https:\/\/www.smarthost.au\/blog\/wp-json\/wp\/v2\/posts\/6456\/revisions"}],"predecessor-version":[{"id":6520,"href":"https:\/\/www.smarthost.au\/blog\/wp-json\/wp\/v2\/posts\/6456\/revisions\/6520"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.smarthost.au\/blog\/wp-json\/wp\/v2\/media\/6462"}],"wp:attachment":[{"href":"https:\/\/www.smarthost.au\/blog\/wp-json\/wp\/v2\/media?parent=6456"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.smarthost.au\/blog\/wp-json\/wp\/v2\/categories?post=6456"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.smarthost.au\/blog\/wp-json\/wp\/v2\/tags?post=6456"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}