{"id":19591,"date":"2016-08-03T07:54:48","date_gmt":"2016-08-03T12:54:48","guid":{"rendered":"https:\/\/www.rosehosting.com\/blog\/?p=19591"},"modified":"2022-12-08T03:29:36","modified_gmt":"2022-12-08T09:29:36","slug":"create-mysql-database-and-user-through-cpanel","status":"publish","type":"post","link":"https:\/\/www.rosehosting.com\/blog\/create-mysql-database-and-user-through-cpanel\/","title":{"rendered":"Create a MySQL Database and User in cPanel"},"content":{"rendered":"
<\/div>

\"mysql<\/p>\n

We’ll show you, how to create a MySQL Database and User in cPanel. There are different ways to create a MySQL database and user. In one of our previous blog articles about MySQL database administration<\/a>, we described how to create a new MySQL database and user through the command line which is pretty easy. If you have a Linux VPS <\/a>with cPanel you can create a new MySQL database through the control panel with just few clicks of your mouse.cPanel is one of the most popular and widely used control panels. In this tutorial we will guide you through the process of creating a MySQL database and user, and assigning the user to the database, on a VPS with cPanel control panel.<\/p>\n

First of all, login to cPanel at https:\/\/yourIPaddress:2083<\/strong><\/em> or https:\/\/yourdomain.com:2083<\/strong><\/em> with your cPanel username and password.<\/p>\n

Click on ‘MySQL Database Wizard’<\/strong> icon under the Databases menu<\/p>\n

\"1\"<\/p>\n

 <\/p>\n

Once there, enter a name for the new database you want to create in the New Database<\/strong> field and go to the next step as shown in the picture. You can notice that the databases created in cPanel start with a prefix, which is the cPanel username. The name of the MySQL database can contain 54 character maximum.<\/p>\n

 <\/p>\n

\"2\"<\/p>\n

 <\/p>\n

A new MySQL database is created and it will be listed in the ‘Current Databases<\/strong>‘ section.<\/p>\n

 <\/p>\n

On the next step we will have to create a new user for the database. This user will be the only user, except the MySQL ‘root’ user that will be able to access the newly created database. Type the new username in the ‘Usernam<\/strong>e’ field (I can be 7 characters long and also starts with a prefix.) and enter a password for the user.\u00a0 You should always use strong password which is at least 10 characters long. You can use the ‘Password Generator’<\/strong> tool provided by cPanel, to generate a strong passwords.
\n\"3\"<\/p>\n

 <\/p>\n

 <\/p>\n

 <\/p>\n

 <\/p>\n

 <\/p>\n

 <\/p>\n

 <\/p>\n

 <\/p>\n

 <\/p>\n

 <\/p>\n

 <\/p>\n

 <\/p>\n

 <\/p>\n

On the next screen, as shown at the screenshot below, you can add privileges to the database user. It is best to add all ‘All privileges’ to be sure that your application will work properly. After you add the desired privileges, click the ‘Next step<\/strong>‘ button to complete the process of creating a new MySQL database and user. With this step the MySQL database and user are ready and you can start using them for whatever you need.<\/p>\n

 <\/p>\n

\"4\"<\/p>\n

 <\/p>\n

If you need to delete a MySQL database, you can easily do that through the ‘MySQL Databases<\/strong>‘ menu. All created database are listed under ‘Current Databases’<\/strong> and they can be deleted by clicking the ‘Delete<\/strong>‘ button under ‘Actions<\/strong>‘.<\/p>\n

If you need more information about how to create a new MySQL database through cPanel you can check their official documentation<\/a>.<\/p>\n


\n

Of course you don\u2019t have to do any of this if you use one of our SSD VPS Hosting <\/a>services, in which case you can simply ask our expert Linux admins to create a new MySQL database for you. They are available 24\u00d77 and will take care of your request immediately.
\nPS<\/strong><\/span>. If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.<\/p>\n","protected":false},"excerpt":{"rendered":"

We’ll show you, how to create a MySQL Database and User in cPanel. There are different ways to create a … <\/p>\n

Read More<\/a><\/p>\n","protected":false},"author":4,"featured_media":19787,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1708,1702,13],"tags":[46,41,39],"yoast_head":"\nCreate a MySQL Database and User in cPanel - RoseHosting<\/title>\n<meta name=\"description\" content=\"Create a MySQL Database and User in cPanel - RoseHosting\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.rosehosting.com\/blog\/create-mysql-database-and-user-through-cpanel\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Create a MySQL Database and User in cPanel - RoseHosting\" \/>\n<meta property=\"og:description\" content=\"Create a MySQL Database and User in cPanel - RoseHosting\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.rosehosting.com\/blog\/create-mysql-database-and-user-through-cpanel\/\" \/>\n<meta property=\"og:site_name\" content=\"RoseHosting\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/RoseHosting\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/rosehosting.helpdesk\" \/>\n<meta property=\"article:published_time\" content=\"2016-08-03T12:54:48+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-12-08T09:29:36+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2016\/08\/mysql-database-user-cpanel.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"600\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Jeff Wilson\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:site\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jeff Wilson\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/create-mysql-database-and-user-through-cpanel\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/create-mysql-database-and-user-through-cpanel\/\"},\"author\":{\"name\":\"Jeff Wilson\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713\"},\"headline\":\"Create a MySQL Database and User in cPanel\",\"datePublished\":\"2016-08-03T12:54:48+00:00\",\"dateModified\":\"2022-12-08T09:29:36+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/create-mysql-database-and-user-through-cpanel\/\"},\"wordCount\":560,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/create-mysql-database-and-user-through-cpanel\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2016\/08\/mysql-database-user-cpanel.jpg\",\"keywords\":[\"cPanel\",\"database\",\"mysql\"],\"articleSection\":[\"Control Panels\",\"Databases\",\"Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.rosehosting.com\/blog\/create-mysql-database-and-user-through-cpanel\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/create-mysql-database-and-user-through-cpanel\/\",\"url\":\"https:\/\/www.rosehosting.com\/blog\/create-mysql-database-and-user-through-cpanel\/\",\"name\":\"Create a MySQL Database and User in cPanel - RoseHosting\",\"isPartOf\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/create-mysql-database-and-user-through-cpanel\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/create-mysql-database-and-user-through-cpanel\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2016\/08\/mysql-database-user-cpanel.jpg\",\"datePublished\":\"2016-08-03T12:54:48+00:00\",\"dateModified\":\"2022-12-08T09:29:36+00:00\",\"description\":\"Create a MySQL Database and User in cPanel - RoseHosting\",\"breadcrumb\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/create-mysql-database-and-user-through-cpanel\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.rosehosting.com\/blog\/create-mysql-database-and-user-through-cpanel\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/create-mysql-database-and-user-through-cpanel\/#primaryimage\",\"url\":\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2016\/08\/mysql-database-user-cpanel.jpg\",\"contentUrl\":\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2016\/08\/mysql-database-user-cpanel.jpg\",\"width\":1200,\"height\":600,\"caption\":\"mysql database user cpanel\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/create-mysql-database-and-user-through-cpanel\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.rosehosting.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create a MySQL Database and User in cPanel\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#website\",\"url\":\"https:\/\/www.rosehosting.com\/blog\/\",\"name\":\"RoseHosting\",\"description\":\"Premium Linux Tutorials Since 2001\",\"publisher\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.rosehosting.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#organization\",\"name\":\"RoseHosting\",\"url\":\"https:\/\/www.rosehosting.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png\",\"contentUrl\":\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png\",\"width\":192,\"height\":192,\"caption\":\"RoseHosting\"},\"image\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/RoseHosting\",\"https:\/\/x.com\/rosehosting\",\"https:\/\/www.linkedin.com\/in\/rosehosting\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713\",\"name\":\"Jeff Wilson\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/09271207587f897ab46faaed9b355252?s=96&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/09271207587f897ab46faaed9b355252?s=96&r=g\",\"caption\":\"Jeff Wilson\"},\"description\":\"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.\",\"sameAs\":[\"https:\/\/www.rosehosting.com\",\"https:\/\/www.facebook.com\/rosehosting.helpdesk\"],\"url\":\"https:\/\/www.rosehosting.com\/blog\/author\/jwilson\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Create a MySQL Database and User in cPanel - RoseHosting","description":"Create a MySQL Database and User in cPanel - RoseHosting","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.rosehosting.com\/blog\/create-mysql-database-and-user-through-cpanel\/","og_locale":"en_US","og_type":"article","og_title":"Create a MySQL Database and User in cPanel - RoseHosting","og_description":"Create a MySQL Database and User in cPanel - RoseHosting","og_url":"https:\/\/www.rosehosting.com\/blog\/create-mysql-database-and-user-through-cpanel\/","og_site_name":"RoseHosting","article_publisher":"https:\/\/www.facebook.com\/RoseHosting","article_author":"https:\/\/www.facebook.com\/rosehosting.helpdesk","article_published_time":"2016-08-03T12:54:48+00:00","article_modified_time":"2022-12-08T09:29:36+00:00","og_image":[{"width":1200,"height":600,"url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2016\/08\/mysql-database-user-cpanel.jpg","type":"image\/jpeg"}],"author":"Jeff Wilson","twitter_card":"summary_large_image","twitter_creator":"@rosehosting","twitter_site":"@rosehosting","twitter_misc":{"Written by":"Jeff Wilson","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.rosehosting.com\/blog\/create-mysql-database-and-user-through-cpanel\/#article","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/create-mysql-database-and-user-through-cpanel\/"},"author":{"name":"Jeff Wilson","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713"},"headline":"Create a MySQL Database and User in cPanel","datePublished":"2016-08-03T12:54:48+00:00","dateModified":"2022-12-08T09:29:36+00:00","mainEntityOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/create-mysql-database-and-user-through-cpanel\/"},"wordCount":560,"commentCount":0,"publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/create-mysql-database-and-user-through-cpanel\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2016\/08\/mysql-database-user-cpanel.jpg","keywords":["cPanel","database","mysql"],"articleSection":["Control Panels","Databases","Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.rosehosting.com\/blog\/create-mysql-database-and-user-through-cpanel\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.rosehosting.com\/blog\/create-mysql-database-and-user-through-cpanel\/","url":"https:\/\/www.rosehosting.com\/blog\/create-mysql-database-and-user-through-cpanel\/","name":"Create a MySQL Database and User in cPanel - RoseHosting","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/create-mysql-database-and-user-through-cpanel\/#primaryimage"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/create-mysql-database-and-user-through-cpanel\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2016\/08\/mysql-database-user-cpanel.jpg","datePublished":"2016-08-03T12:54:48+00:00","dateModified":"2022-12-08T09:29:36+00:00","description":"Create a MySQL Database and User in cPanel - RoseHosting","breadcrumb":{"@id":"https:\/\/www.rosehosting.com\/blog\/create-mysql-database-and-user-through-cpanel\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.rosehosting.com\/blog\/create-mysql-database-and-user-through-cpanel\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/create-mysql-database-and-user-through-cpanel\/#primaryimage","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2016\/08\/mysql-database-user-cpanel.jpg","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2016\/08\/mysql-database-user-cpanel.jpg","width":1200,"height":600,"caption":"mysql database user cpanel"},{"@type":"BreadcrumbList","@id":"https:\/\/www.rosehosting.com\/blog\/create-mysql-database-and-user-through-cpanel\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.rosehosting.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Create a MySQL Database and User in cPanel"}]},{"@type":"WebSite","@id":"https:\/\/www.rosehosting.com\/blog\/#website","url":"https:\/\/www.rosehosting.com\/blog\/","name":"RoseHosting","description":"Premium Linux Tutorials Since 2001","publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.rosehosting.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.rosehosting.com\/blog\/#organization","name":"RoseHosting","url":"https:\/\/www.rosehosting.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","width":192,"height":192,"caption":"RoseHosting"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/RoseHosting","https:\/\/x.com\/rosehosting","https:\/\/www.linkedin.com\/in\/rosehosting\/"]},{"@type":"Person","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713","name":"Jeff Wilson","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/09271207587f897ab46faaed9b355252?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/09271207587f897ab46faaed9b355252?s=96&r=g","caption":"Jeff Wilson"},"description":"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.","sameAs":["https:\/\/www.rosehosting.com","https:\/\/www.facebook.com\/rosehosting.helpdesk"],"url":"https:\/\/www.rosehosting.com\/blog\/author\/jwilson\/"}]}},"_links":{"self":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/19591"}],"collection":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/comments?post=19591"}],"version-history":[{"count":3,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/19591\/revisions"}],"predecessor-version":[{"id":43783,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/19591\/revisions\/43783"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media\/19787"}],"wp:attachment":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media?parent=19591"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/categories?post=19591"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/tags?post=19591"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}