{"id":287,"date":"2025-12-17T10:50:49","date_gmt":"2025-12-17T09:50:49","guid":{"rendered":"https:\/\/mybox.com\/help\/?post_type=manual_kb&#038;p=287"},"modified":"2026-04-02T09:32:42","modified_gmt":"2026-04-02T07:32:42","slug":"how-do-i-change-a-user-assigned-to-a-database","status":"publish","type":"manual_kb","link":"https:\/\/mybox.com\/help\/en\/knowledgebase\/how-do-i-change-a-user-assigned-to-a-database\/","title":{"rendered":"How do I change a user assigned to a database?"},"content":{"rendered":"\n<div class=\"translation-block translation-block-merged\">\n<p class=\"wp-block-paragraph\">Changing the user assigned to a MySQL database is a two-step process: you must first grant access to a new user and then revoke access from the previous one. This ensures your website or application maintains a continuous connection to its data during the transition.<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_86 ez-toc-wrap-left counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/mybox.com\/help\/en\/knowledgebase\/how-do-i-change-a-user-assigned-to-a-database\/#Context\" >Context<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/mybox.com\/help\/en\/knowledgebase\/how-do-i-change-a-user-assigned-to-a-database\/#Phase_1_Assign_a_new_user\" >Phase 1: Assign a new user<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/mybox.com\/help\/en\/knowledgebase\/how-do-i-change-a-user-assigned-to-a-database\/#Phase_2_Revoke_the_previous_users_access\" >Phase 2: Revoke the previous user&#8217;s access<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/mybox.com\/help\/en\/knowledgebase\/how-do-i-change-a-user-assigned-to-a-database\/#Distinction_Deleting_a_User_vs_Disconnecting_a_User\" >Distinction: Deleting a User vs. Disconnecting a User<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/mybox.com\/help\/en\/knowledgebase\/how-do-i-change-a-user-assigned-to-a-database\/#Practical_Implications\" >Practical Implications<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/mybox.com\/help\/en\/knowledgebase\/how-do-i-change-a-user-assigned-to-a-database\/#Summary\" >Summary<\/a><\/li><\/ul><\/nav><\/div>\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Context\"><\/span>Context<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Each database in the <strong>mybox panel<\/strong> is protected by user permissions. You may need to change a database user if you are improving security, separating access for different developers, or rotating credentials after a staff change.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Phase_1_Assign_a_new_user\"><\/span>Phase 1: Assign a new user<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<\/div>\n\n<div id=\"mybox-1073803177\" class=\"mybox-content mybox-entity-placement\"><div class=\"early-access-banner-inpost\">\r\n  <div class=\"banner-left-inpost\">\r\n    <div class=\"icon-box-inpost\">\r\n      <img decoding=\"async\" src=\"https:\/\/mybox.com\/help\/wp-content\/uploads\/2026\/02\/square-info-icon.svg\" alt=\"Info\">\r\n    <\/div>\r\n    <div class=\"text-box-inpost\">\r\n      <span class=\"label-inpost\"><span class=\"translation-block translation-block-banner-text\">Early access<\/span><\/span>\r\n      <h4><span class=\"translation-block translation-block-banner-text\">Still need help?<\/span><\/h4>\r\n      <p><span class=\"translation-block translation-block-banner-text\">Contact our customer service team.<\/span><\/p>\r\n    <\/div>\r\n  <\/div>\r\n\r\n  <div class=\"banner-right-inpost\">\r\n    <a href=\"https:\/\/panel.mybox.com\/helpdesk2\/v\/list\/\" class=\"banner-button-inpost\"><span class=\"translation-block translation-block-banner-text\">Message us<\/span><\/a>\r\n  <\/div>\r\n<\/div><\/div>\n\n<div class=\"translation-block translation-block-merged\"><p class=\"wp-block-paragraph\">To grant a new user access to your database:<\/p>\n\n\n\n<ol start=\"1\" class=\"wp-block-list\">\n<li><strong>Navigate to MySQL Users:<\/strong> Log in to the <strong>mybox panel<\/strong> and go to the <strong>Databases<\/strong> module, then select the <strong>MySQL Users<\/strong> tab.<\/li>\n\n\n\n<li><strong>Create or Select a User:<\/strong> You can either create a new user or select an existing one from the list.<\/li>\n\n\n\n<li><strong>Link the Database:<\/strong> In the user creation or edit form, find the <strong>Assigned databases<\/strong> section.<\/li>\n\n\n\n<li><strong>Set Permissions:<\/strong> Select the specific database you want this user to manage and choose the appropriate permission level (e.g., All Privileges or Read-Only).<\/li>\n\n\n\n<li><strong>Confirm:<\/strong> Click <strong>Add MySQL User<\/strong> or <strong>Save Changes<\/strong>.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Phase_2_Revoke_the_previous_users_access\"><\/span>Phase 2: Revoke the previous user&#8217;s access<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Once the new user is successfully connected and your website configuration (like <code>wp-config.php<\/code>) has been updated with the new credentials, you should remove the old user&#8217;s access.<\/p>\n\n\n\n<ol start=\"1\" class=\"wp-block-list\">\n<li><strong>Open User Details:<\/strong> In the <strong>MySQL Users<\/strong> list, click on the name of the user you wish to disconnect.<\/li>\n\n\n\n<li><strong>Manage Assignments:<\/strong> In the expanded menu, click on <strong>Assigned databases<\/strong>.<\/li>\n\n\n\n<li><strong>Disconnect:<\/strong> Locate the database in the list and click the <strong>Disconnect<\/strong> button. The user will immediately lose access to that specific database.<\/li>\n<\/ol>\n\n\n\n<\/div>\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"877\" height=\"568\" src=\"https:\/\/mybox.com\/help\/wp-content\/uploads\/2025\/12\/image-131.png\" alt=\"\" class=\"wp-image-4054\" srcset=\"https:\/\/mybox.com\/help\/wp-content\/uploads\/2025\/12\/image-131.png 877w, https:\/\/mybox.com\/help\/wp-content\/uploads\/2025\/12\/image-131-300x194.png 300w, https:\/\/mybox.com\/help\/wp-content\/uploads\/2025\/12\/image-131-768x497.png 768w, https:\/\/mybox.com\/help\/wp-content\/uploads\/2025\/12\/image-131-18x12.png 18w\" sizes=\"auto, (max-width: 877px) 100vw, 877px\" \/><\/figure>\n\n<div class=\"translation-block translation-block-merged\">\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Distinction_Deleting_a_User_vs_Disconnecting_a_User\"><\/span>Distinction: Deleting a User vs. Disconnecting a User<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Disconnecting:<\/strong> Removes the user&#8217;s &#8220;key&#8221; to a specific database. The user account still exists and may still have access to other databases.<\/li>\n\n\n\n<li><strong>Deleting:<\/strong> Completely removes the user from the <strong>mybox panel<\/strong>. They will lose access to all assigned databases simultaneously.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Practical_Implications\"><\/span>Practical Implications<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Update Configuration Files:<\/strong> Before disconnecting the old user, ensure your website&#8217;s configuration file (e.g., <code>configuration.php<\/code> for Joomla or <code>.env<\/code> for Laravel) is updated with the new username and password. If you skip this, your website will display a &#8220;Database Connection Error.&#8221;<\/li>\n\n\n\n<li><strong>Propagation:<\/strong> Changes to database permissions in the <strong>mybox panel<\/strong> happen instantly. There is no waiting period for these settings to take effect.<\/li>\n\n\n\n<li><strong>Security Best Practice:<\/strong> It is safer to have the new user active and tested before revoking the old one to avoid any site downtime.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Summary\"><\/span>Summary<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Managing database access is a straightforward balancing act: first, ensure the new &#8220;key&#8221; works, then retire the old one. By using the <strong>MySQL Users<\/strong> tab in the <strong>mybox panel<\/strong>, you maintain granular control over who can interact with your data.<\/p>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"template":"","format":"standard","manualknowledgebasecat":[9,25],"manual_kb_tag":[642,2066,2067,3697,3698,3699,3700,3701,3702,3703],"class_list":["post-287","manual_kb","type-manual_kb","status-publish","format-standard","hentry","manualknowledgebasecat-databases","manualknowledgebasecat-hosting","manual_kb_tag-database-user-management","manual_kb_tag-database-permissions","manual_kb_tag-user-permissions","manual_kb_tag-change-database-user","manual_kb_tag-create-database-user","manual_kb_tag-assign-user-to-database","manual_kb_tag-revoke-database-permissions","manual_kb_tag-my-users-page","manual_kb_tag-databases-module","manual_kb_tag-assign-databases"],"_links":{"self":[{"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/manual_kb\/287","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/manual_kb"}],"about":[{"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/types\/manual_kb"}],"author":[{"embeddable":true,"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/users\/1"}],"version-history":[{"count":2,"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/manual_kb\/287\/revisions"}],"predecessor-version":[{"id":4056,"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/manual_kb\/287\/revisions\/4056"}],"wp:attachment":[{"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/media?parent=287"}],"wp:term":[{"taxonomy":"manualknowledgebasecat","embeddable":true,"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/manualknowledgebasecat?post=287"},{"taxonomy":"manual_kb_tag","embeddable":true,"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/manual_kb_tag?post=287"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}