{"id":108,"date":"2020-05-11T21:43:18","date_gmt":"2020-05-11T19:43:18","guid":{"rendered":"https:\/\/interwebsa.com\/blog\/?p=108"},"modified":"2020-05-11T21:43:18","modified_gmt":"2020-05-11T19:43:18","slug":"how-to-add-a-user-to-a-mysql-database","status":"publish","type":"post","link":"https:\/\/interwebdev.co.za\/index.php\/2020\/05\/11\/how-to-add-a-user-to-a-mysql-database\/","title":{"rendered":"How To Add A User To A MySql Database"},"content":{"rendered":"\n<p>Once you&nbsp;<a href=\"https:\/\/www.namehero.com\/knowledgebase\/11\/How-To-Create-A-MySQL-Database.html\" target=\"_blank\" rel=\"noreferrer noopener\">create a MySQL Database<\/a>, you will need to&nbsp;<strong>Add a User to the MySQL Database<\/strong>&nbsp;in order to make it work.<\/p>\n\n\n\n<p>In this tutorial, we\u2019ll show you how to&nbsp;<strong>Add a User to a MySQL Database<\/strong>.<br><br>First, you need to make sure that you have&nbsp;<em>created the MySQL Database<\/em>&nbsp;that you would like to add the user to. &nbsp;For that article, please&nbsp;<a href=\"https:\/\/www.namehero.com\/knowledgebase\/11\/How-To-Create-A-MySQL-Database.html\" target=\"_blank\" rel=\"noreferrer noopener\">click here<\/a>.<br><br>Once in the&nbsp;MySQL\u00ae Databases inside cPanel,&nbsp;<strong>scroll down to MySQL Users<\/strong>.<br><br><img fetchpriority=\"high\" decoding=\"async\" src=\"https:\/\/interwebsa.com\/billing\/index.php?rp=\/images\/kb\/24_mysqlusers.png\" alt=\"\" width=\"600\" height=\"466\"><\/p>\n\n\n\n<p><br><br>1) We must&nbsp;<em>create the user to Add to the MySQL Database<\/em>. &nbsp;To do this,&nbsp;<strong>fill out the fields<\/strong>&nbsp;pictured above by creating a&nbsp;<strong>Username<\/strong>&nbsp;and&nbsp;<strong>Password<\/strong>. &nbsp;The prefix to the MySQL user will be your Username.<br><br><em>Hero tip: Make sure to make note of your MySQL User login credentials, as scripts will require them in their config files.<\/em><br><br>For this example, we&#8217;re going use to the Username<em>&nbsp;example<\/em>&nbsp;followed by a&nbsp;<em>secure password<\/em>.<br><br>2)&nbsp;<strong>Click Create User<\/strong>&nbsp;(pictured below):<br><br><img decoding=\"async\" src=\"https:\/\/interwebsa.com\/billing\/index.php?rp=\/images\/kb\/25_user.png\" alt=\"\" width=\"600\" height=\"283\"><\/p>\n\n\n\n<p><br><br>3) After you have created the user, you will see this screen:<br><br><img decoding=\"async\" src=\"https:\/\/interwebsa.com\/billing\/index.php?rp=\/images\/kb\/26_successuser.png\" alt=\"\" width=\"600\" height=\"151\"><\/p>\n\n\n\n<p><br><br>4)&nbsp;<strong>Click the blue Go Back<\/strong>&nbsp;link<br><br>Now we will&nbsp;Add the User&nbsp;<em>yoursupp_example<\/em>&nbsp;to the&nbsp;Database&nbsp;<em>yoursupp_example1<\/em>&nbsp;(the MySQL database we created in&nbsp;<a href=\"https:\/\/www.namehero.com\/knowledgebase\/11\/How-To-Create-A-MySQL-Database.html\" target=\"_blank\" rel=\"noreferrer noopener\">this example<\/a>)<br><br>5)&nbsp;<strong>Select both the name of your User and Database<\/strong>&nbsp;you want to Add. &nbsp;We listed our values above, notice they are selected in the dropdown menus pictured below.<br><br><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/interwebsa.com\/billing\/index.php?rp=\/images\/kb\/27_userdata.png\" alt=\"\" width=\"600\" height=\"192\"><\/p>\n\n\n\n<p><br><br><strong>Click the blue Add button<\/strong>&nbsp;pictured above.<br><br>6) Once that is complete, we&#8217;ll assign the User Priviledges on the next page. &nbsp;In our example, we&#8217;re going to assign the user &#8220;ALL PRIVILEGES&#8221; by&nbsp;<strong>ticking the box<\/strong>. &nbsp;You can see what we did in the image below:<br><br><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/interwebsa.com\/billing\/index.php?rp=\/images\/kb\/28_priv.png\" alt=\"\" width=\"600\" height=\"508\"><\/p>\n\n\n\n<p><br><br><strong>Click the blue Make Changes<\/strong>&nbsp;button and you have successfully added a user to a MySQL database. &nbsp;You will see the following success screen:<br><br><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/interwebsa.com\/billing\/index.php?rp=\/images\/kb\/29_succesadduser.png\" alt=\"\" width=\"600\" height=\"98\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Once you&nbsp;create a MySQL Database, you will need to&nbsp;Add a User to the MySQL Database&nbsp;in order to make it work. In this tutorial, we\u2019ll show you how to&nbsp;Add a User to a MySQL Database. First, you need to make sure that you have&nbsp;created the MySQL Database&nbsp;that you would like to add the user to. &nbsp;For [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[68,69],"tags":[52,53,54,55,56,8,57,59,60,61,62,63,64,65,66],"class_list":["post-108","post","type-post","status-publish","format-standard","hentry","category-beginner-guides","category-shared-hosting","tag-co-za","tag-com","tag-affordable","tag-cheap","tag-cpanel","tag-development","tag-domain","tag-hosting","tag-joomla","tag-registration","tag-reseller","tag-shared","tag-south-africa","tag-website","tag-wordpress"],"acf":[],"_links":{"self":[{"href":"https:\/\/interwebdev.co.za\/index.php\/wp-json\/wp\/v2\/posts\/108","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/interwebdev.co.za\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/interwebdev.co.za\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/interwebdev.co.za\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/interwebdev.co.za\/index.php\/wp-json\/wp\/v2\/comments?post=108"}],"version-history":[{"count":0,"href":"https:\/\/interwebdev.co.za\/index.php\/wp-json\/wp\/v2\/posts\/108\/revisions"}],"wp:attachment":[{"href":"https:\/\/interwebdev.co.za\/index.php\/wp-json\/wp\/v2\/media?parent=108"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/interwebdev.co.za\/index.php\/wp-json\/wp\/v2\/categories?post=108"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/interwebdev.co.za\/index.php\/wp-json\/wp\/v2\/tags?post=108"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}