{"id":7333,"date":"2026-08-20T18:28:35","date_gmt":"2026-08-20T16:28:35","guid":{"rendered":"https:\/\/www.webhostingsrbija.rs\/?p=7333"},"modified":"2026-08-20T18:28:35","modified_gmt":"2026-08-20T16:28:35","slug":"mysql-baze","status":"publish","type":"post","link":"https:\/\/www.webhostingsrbija.rs\/en\/mysql-baze\/","title":{"rendered":"MySQL database in WHSPanel"},"content":{"rendered":"<p>MySQL databases store the structured data of your applications (WordPress, Magento, stores, custom applications). In this part of the panel, you create databases, database users and manage their permissions. Database and user names are automatically prefixed with your account name (for example <code>whsuser_<\/code>) so that there are no collisions with other users on the server.<\/p>\n\n<h2>1. Overview<\/h2>\n<p>Open in the menu <strong>Databases<\/strong> well <strong>MySQL databases<\/strong>. There are three tabs at the top: <strong>Databases<\/strong> (how many do you have), <strong>Total size<\/strong> and <strong>Database users<\/strong>. Below are two tables: a list of databases (each with its own actions) and a list of users.<\/p>\n\n\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;6ac326a607323&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"6ac326a607323\" class=\"wp-block-image size-large wp-lightbox-container\"><img fetchpriority=\"high\" decoding=\"async\" width=\"1024\" height=\"822\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/www.webhostingsrbija.rs\/wp-content\/uploads\/2026\/08\/mysql-populated-a-1024x822.avif\" alt=\"MySQL upravljanje u WHSPanelu\" class=\"wp-image-7531\" title=\"\" srcset=\"https:\/\/www.webhostingsrbija.rs\/wp-content\/uploads\/2026\/08\/mysql-populated-a-1024x822.avif 1024w, https:\/\/www.webhostingsrbija.rs\/wp-content\/uploads\/2026\/08\/mysql-populated-a-300x241.avif 300w, https:\/\/www.webhostingsrbija.rs\/wp-content\/uploads\/2026\/08\/mysql-populated-a-768x617.avif 768w, https:\/\/www.webhostingsrbija.rs\/wp-content\/uploads\/2026\/08\/mysql-populated-a-1536x1233.avif 1536w, https:\/\/www.webhostingsrbija.rs\/wp-content\/uploads\/2026\/08\/mysql-populated-a-2048x1644.avif 2048w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\tdata-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.thisImage.buttonRight\"\n\t\t\tdata-wp-style--top=\"state.thisImage.buttonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><figcaption class=\"wp-block-image__caption\">Populated state: bases and users with all actions.<\/figcaption><\/figure>\n\n\n<h2>2. The easiest way: Base wizard<\/h2>\n<p>Click <strong>Database Wizard<\/strong> to create a database, a user and assign privileges at once in four steps (Database, User, Privileges, Done).<\/p>\n\n\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;6ac326a6078dd&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"6ac326a6078dd\" class=\"wp-block-image size-large wp-lightbox-container\"><img decoding=\"async\" width=\"1024\" height=\"840\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/www.webhostingsrbija.rs\/wp-content\/uploads\/2026\/08\/mysql-wizard-p-1024x840.avif\" alt=\"MySQL \u010darobnjak za baze\" class=\"wp-image-7532\" title=\"\" srcset=\"https:\/\/www.webhostingsrbija.rs\/wp-content\/uploads\/2026\/08\/mysql-wizard-p-1024x840.avif 1024w, https:\/\/www.webhostingsrbija.rs\/wp-content\/uploads\/2026\/08\/mysql-wizard-p-300x246.avif 300w, https:\/\/www.webhostingsrbija.rs\/wp-content\/uploads\/2026\/08\/mysql-wizard-p-768x630.avif 768w, https:\/\/www.webhostingsrbija.rs\/wp-content\/uploads\/2026\/08\/mysql-wizard-p-1536x1260.avif 1536w, https:\/\/www.webhostingsrbija.rs\/wp-content\/uploads\/2026\/08\/mysql-wizard-p-2048x1680.avif 2048w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\tdata-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.thisImage.buttonRight\"\n\t\t\tdata-wp-style--top=\"state.thisImage.buttonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><figcaption class=\"wp-block-image__caption\">Wizard: Base, User, and Privileges in Four Steps.<\/figcaption><\/figure>\n\n\n<h2>3. Handcrafted<\/h2>\n<ul>\n<li><strong>Create database:<\/strong> enter the name (only letters, numbers and underscores are allowed). The database appears in the table.<\/li>\n<li><strong>Create user:<\/strong> create a separate database user account with a password.<\/li>\n<\/ul>\n\n<h2>4. Actions on the database<\/h2>\n<p>At each base in the table there are buttons:<\/p>\n<table>\n<thead><tr><th>Action<\/th><th>What does it do?<\/th><\/tr><\/thead>\n<tbody>\n<tr><td><strong>Export<\/strong><\/td><td>Downloads the entire database as <code>.sql<\/code> file, for backup or migration to another server.<\/td><\/tr>\n<tr><td><strong>Remote access<\/strong><\/td><td>Controls which external IP addresses are allowed to connect to the base from outside the server (for connecting from another server or from a desktop tool).<\/td><\/tr>\n<tr><td><strong>Privileges<\/strong><\/td><td>It determines which users have access to the database and which operations they are allowed (explained below).<\/td><\/tr>\n<tr><td><strong>phpMyAdmin<\/strong><\/td><td>Opens phpMyAdmin, a web tool for viewing and editing tables and running SQL queries directly in the browser.<\/td><\/tr>\n<tr><td><strong>Delete<\/strong><\/td><td>Permanently deletes the base. Before deleting it, you must export it.<\/td><\/tr>\n<\/tbody>\n<\/table>\n\n<h2>5. Granting privileges<\/h2>\n<p>By clicking on <strong>Privileges<\/strong> a list of users who have access to that database opens. With a button <strong>Grant privileges<\/strong> you connect the user to the database and choose which operations he is allowed to perform (SELECT, INSERT, UPDATE, DELETE and others). For a typical application, grant its user all privileges over its base.<\/p>\n\n\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;6ac326a607c23&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"6ac326a607c23\" class=\"wp-block-image size-large wp-lightbox-container\"><img decoding=\"async\" width=\"1024\" height=\"822\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/www.webhostingsrbija.rs\/wp-content\/uploads\/2026\/08\/mysql-privileges-1024x822.avif\" alt=\"Dijalog Privilegije baze u WHSPanelu\" class=\"wp-image-7533\" title=\"\" srcset=\"https:\/\/www.webhostingsrbija.rs\/wp-content\/uploads\/2026\/08\/mysql-privileges-1024x822.avif 1024w, https:\/\/www.webhostingsrbija.rs\/wp-content\/uploads\/2026\/08\/mysql-privileges-300x241.avif 300w, https:\/\/www.webhostingsrbija.rs\/wp-content\/uploads\/2026\/08\/mysql-privileges-768x617.avif 768w, https:\/\/www.webhostingsrbija.rs\/wp-content\/uploads\/2026\/08\/mysql-privileges-1536x1233.avif 1536w, https:\/\/www.webhostingsrbija.rs\/wp-content\/uploads\/2026\/08\/mysql-privileges-2048x1644.avif 2048w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\tdata-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.thisImage.buttonRight\"\n\t\t\tdata-wp-style--top=\"state.thisImage.buttonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><figcaption class=\"wp-block-image__caption\">Assigning privileges: which user and which operations on the database.<\/figcaption><\/figure>\n\n\n<h2>6. Database users<\/h2>\n<p>Database users are separate login accounts that your applications use to connect to MySQL. They are not the same as your hosting account. Each user has buttons:<\/p>\n<ul>\n<li><strong>Password:<\/strong> changes the user&#039;s password (if leaked or needs to be rotated).<\/li>\n<li><strong>Delete:<\/strong> removes the user.<\/li>\n<\/ul>\n<p>It is recommended that you create one user per application and grant him access only to the databases he needs.<\/p>\n\n<h2>7. How to connect WordPress or another application<\/h2>\n<ul>\n<li><strong>Database name:<\/strong> full name with a prefix (eg <code>whsuser_mysite<\/code>).<\/li>\n<li><strong>Database user:<\/strong> the user you created (same with the prefix), to whom you assigned privileges over that database.<\/li>\n<li><strong>Password:<\/strong> that user&#039;s password.<\/li>\n<li><strong>Host:<\/strong> <code>localhost<\/code> (the database is on the same server as the site).<\/li>\n<\/ul>\n\n<blockquote><p><strong>Note:<\/strong> always use full database and user name with account prefix; without a prefix the connection does not work. Do not forget to the user <strong>grant privileges<\/strong> over the database, otherwise the application cannot access it.<\/p><\/blockquote>\n\n<blockquote><p><strong>Security:<\/strong> create a separate user per application with only necessary privileges and regularly export the database as a backup.<\/p><\/blockquote>","protected":false},"excerpt":{"rendered":"<p>How to create a MySQL database, user and assign privileges in WHSPanel and connect WordPress or other application to the database.<\/p>","protected":false},"author":1,"featured_media":7311,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[206,203],"tags":[],"class_list":["post-7333","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-baze-podataka","category-whs-panel"],"_links":{"self":[{"href":"https:\/\/www.webhostingsrbija.rs\/en\/wp-json\/wp\/v2\/posts\/7333","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webhostingsrbija.rs\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webhostingsrbija.rs\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webhostingsrbija.rs\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webhostingsrbija.rs\/en\/wp-json\/wp\/v2\/comments?post=7333"}],"version-history":[{"count":1,"href":"https:\/\/www.webhostingsrbija.rs\/en\/wp-json\/wp\/v2\/posts\/7333\/revisions"}],"predecessor-version":[{"id":7570,"href":"https:\/\/www.webhostingsrbija.rs\/en\/wp-json\/wp\/v2\/posts\/7333\/revisions\/7570"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.webhostingsrbija.rs\/en\/wp-json\/wp\/v2\/media\/7311"}],"wp:attachment":[{"href":"https:\/\/www.webhostingsrbija.rs\/en\/wp-json\/wp\/v2\/media?parent=7333"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webhostingsrbija.rs\/en\/wp-json\/wp\/v2\/categories?post=7333"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webhostingsrbija.rs\/en\/wp-json\/wp\/v2\/tags?post=7333"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}