{"id":2331,"date":"2026-04-01T23:38:37","date_gmt":"2026-04-01T23:38:37","guid":{"rendered":"https:\/\/veerhost.com\/docs\/how-to-create-mysql-database-cpanel\/"},"modified":"2026-07-02T23:03:47","modified_gmt":"2026-07-02T23:03:47","slug":"how-to-create-mysql-database-cpanel","status":"publish","type":"docs","link":"https:\/\/veerhost.com\/de\/docs\/getting-started\/how-to-create-mysql-database-cpanel\/","title":{"rendered":"How to Create and Manage MySQL Databases in cPanel"},"content":{"rendered":"<h2 class=\"wp-block-heading\">Overview<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Most web applications \u2014 including WordPress, Joomla, Magento, and custom PHP scripts \u2014 require a <strong>MySQL database<\/strong> to store content and settings. cPanel makes it easy to create databases, database users, and assign permissions without needing to touch the command line.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 1 \u2014 Create a New Database<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Log in to your <strong>cPanel<\/strong> account.<\/li>\n<li>In the <strong>Databases<\/strong> section, click <strong>MySQL Databases<\/strong>.<\/li>\n<li>Under <strong>Create New Database<\/strong>, type a name for your database (e.g., <code>mysite_db<\/code>).<\/li>\n<li>Click <strong>Create Database<\/strong>.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Note: cPanel will automatically prefix the database name with your cPanel username (e.g., <code>cpuser_mysite_db<\/code>). This is normal.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 2 \u2014 Create a Database User<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Scroll down to <strong>MySQL Users<\/strong>.<\/li>\n<li>Under <strong>Add New User<\/strong>, enter a username and a strong password.<\/li>\n<li>Click <strong>Create User<\/strong>.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Like databases, the username will be prefixed automatically (e.g., <code>cpuser_myuser<\/code>).<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 3 \u2014 Assign the User to the Database<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Scroll down to <strong>Add User to Database<\/strong>.<\/li>\n<li>Select your newly created user and your database from the dropdowns.<\/li>\n<li>Click <strong>Add<\/strong>.<\/li>\n<li>On the next screen, select <strong>All Privileges<\/strong>, then click <strong>Make Changes<\/strong>.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Your database is now ready to use. Use the full prefixed names (e.g., <code>cpuser_mysite_db<\/code> and <code>cpuser_myuser<\/code>) when connecting your application.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How to Manage Your Database with phpMyAdmin<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">cPanel includes <strong>phpMyAdmin<\/strong>, a web-based interface for managing your databases visually.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>In cPanel, click <strong>phpMyAdmin<\/strong> (under the Databases section).<\/li>\n<li>Select your database from the left sidebar.<\/li>\n<li>From here you can browse tables, run SQL queries, import\/export data, and more.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">How to Delete a Database<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">To remove a database you no longer need:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Go to <strong>MySQL Databases<\/strong> in cPanel.<\/li>\n<li>Scroll to the <strong>Current Databases<\/strong> list.<\/li>\n<li>Click <strong>Delete<\/strong> next to the database you want to remove.<\/li>\n<li>Confirm the deletion.<\/li>\n<\/ol>\n\n\n\n\n<p class=\"wp-block-paragraph\">\u26a0\ufe0f <strong>Warning:<\/strong> Deleting a database is permanent. Always take a backup first via phpMyAdmin (<em>Export<\/em> tab) before deleting anything.<\/p>\n\n\n\n\n<h2 class=\"wp-block-heading\">WordPress Database Details<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">When connecting WordPress to your database, you will need to enter these details in <code>wp-config.php<\/code>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>DB_NAME:<\/strong> the full prefixed database name<\/li>\n<li><strong>DB_USER:<\/strong> the full prefixed database username<\/li>\n<li><strong>DB_PASSWORD:<\/strong> the database user&rsquo;s password<\/li>\n<li><strong>DB_HOST:<\/strong> <code>localhost<\/code> (this is almost always correct on shared hosting)<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Need help? <a href=\"https:\/\/veerhost.com\/de\/support\/\" target=\"_blank\" rel=\"noopener noreferrer\">Open a support ticket<\/a> and our team will assist you.<\/p>","protected":false},"excerpt":{"rendered":"<p>Overview Most web applications \u2014 including WordPress, Joomla, Magento, and custom PHP scripts \u2014 require a MySQL database to store content and [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":1894,"menu_order":8,"comment_status":"open","ping_status":"closed","template":"","doc_tag":[],"class_list":["post-2331","docs","type-docs","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/veerhost.com\/de\/wp-json\/wp\/v2\/docs\/2331","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/veerhost.com\/de\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/veerhost.com\/de\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/veerhost.com\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/veerhost.com\/de\/wp-json\/wp\/v2\/comments?post=2331"}],"version-history":[{"count":1,"href":"https:\/\/veerhost.com\/de\/wp-json\/wp\/v2\/docs\/2331\/revisions"}],"predecessor-version":[{"id":2336,"href":"https:\/\/veerhost.com\/de\/wp-json\/wp\/v2\/docs\/2331\/revisions\/2336"}],"up":[{"embeddable":true,"href":"https:\/\/veerhost.com\/de\/wp-json\/wp\/v2\/docs\/1894"}],"wp:attachment":[{"href":"https:\/\/veerhost.com\/de\/wp-json\/wp\/v2\/media?parent=2331"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/veerhost.com\/de\/wp-json\/wp\/v2\/doc_tag?post=2331"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}