{"id":2471,"date":"2013-02-21T15:38:02","date_gmt":"2013-02-21T20:38:02","guid":{"rendered":"https:\/\/www.inmotionhosting.com\/support\/2013\/02\/21\/309-locate-db-name\/"},"modified":"2021-08-16T23:21:19","modified_gmt":"2021-08-17T03:21:19","slug":"locate-drupal-database-name","status":"publish","type":"post","link":"https:\/\/www.inmotionhosting.com\/support\/edu\/drupal\/locate-drupal-database-name\/","title":{"rendered":"How to find your Drupal 7 database name"},"content":{"rendered":"<p>When you <a href=\"\/support\/\">install <span><span>Drupal<\/span><\/span> 7 using the <span><span>Softaculous<\/span><\/span> installer tool<\/a>, settings such as the database name are automatically generated for your installation. Although the database name is listed on the installation information page, most people do not keep track of it. Later on, when performing specific maintenance, troubleshooting, or needing to change something that the <span><span>Drupal<\/span><\/span> back office does not handle, they may need to access the database directly. As most hosting accounts use more than one database, this can be confusing. Below are instructions on how to locate the exact database name used by your <span><span>Drupal<\/span><\/span> 7 installation.<\/p>\n<h2>Finding the database name for your <span><span>Drupal<\/span><\/span> 7 site<\/h2>\n<ol class=\"article_list\">\n<li>You will first need to <a href=\"\/support\/edu\/cpanel\/how-to-log-into-cpanel\/\" target=\"_blank\" rel=\"noopener noreferrer\">log into your cPanel<\/a> dashboard.<\/li>\n<li>Next, from the <span><span>cPanel<\/span><\/span> dashboard, locate and enter the <strong><a href=\"\/support\/edu\/cpanel\/using-file-manager-in-cpanel\/\" target=\"_blank\" rel=\"noopener noreferrer\">File Manager<\/a><\/strong>.<\/li>\n<li>Once in the <em>File Manager<\/em>, locate the root folder for your <span><span>Drupal<\/span><\/span> application. If you are using Drupal for your main domain, then the folder you want to be in is the <em>public_html<\/em> folder. If you are using Drupal for an addon domain, then it will be in a subfolder. For instance, if example.com is your addon domain using Drupal then it will be found under the <em>public_html\/example.com<\/em> folder.<\/li>\n<li>Now that you have found the root folder for your Drupal installation, look for the configuration file by going to the <strong>sites<\/strong> and then the <strong>default<\/strong> folder. For example, for your main domain, you will be under the <em>public_html\/sites\/default<\/em> path. Look for the file named <strong>settings.php<\/strong>. Highlight the file and click on the <strong>Edit<\/strong> icon located in the toolbar across the top of the screen. You will also be presented with an additional popup, click the <strong>Edit<\/strong> button on that also to open the file editor.<\/li>\n<li>This brings you to the actual editor so you can see the code and settings Drupal uses. The database settings are found after a giant block of commented text, around line 208. You will see a group of settings, one has the database name. The line appears similar to the one below:\n<p><code>'database' =&gt; 'userna5_drpl123',<\/code><br \/>\nThe database name is made with two parts, the <span><span>username<\/span><\/span> and the actual database name. From the example given above, the <em>username<\/em> portion is userna5 and the database name is <em>drpl123<\/em>.<\/li>\n<li>Be sure to note the database name. Write it down in a safe place if desired. This is the name you will look for when you are managing the database via your <span><span>phpMyAdmin<\/span><\/span> tool.<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>When you install Drupal 7 using the Softaculous installer tool, settings such as the database name are automatically generated for your installation. Although the database name is listed on the installation information page, most people do not keep track of it. Later on, when performing specific maintenance, troubleshooting, or needing to change something that the<a class=\"moretag\" href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/drupal\/locate-drupal-database-name\/\"> Read More ><\/a><\/p>\n","protected":false},"author":8,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[372],"tags":[],"class_list":["post-2471","post","type-post","status-publish","format-standard","hentry","category-drupal"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to find your Drupal 7 database name | InMotion Hosting<\/title>\n<meta name=\"description\" content=\"Need to know your Drupal 7 database name? Find out with this short tutorial.\" \/>\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.inmotionhosting.com\/support\/edu\/drupal\/locate-drupal-database-name\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to find your Drupal 7 database name | InMotion Hosting\" \/>\n<meta property=\"og:description\" content=\"Need to know your Drupal 7 database name? Find out with this short tutorial.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.inmotionhosting.com\/support\/edu\/drupal\/locate-drupal-database-name\/\" \/>\n<meta property=\"og:site_name\" content=\"InMotion Hosting Support Center\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/inmotionhosting\/\" \/>\n<meta property=\"article:published_time\" content=\"2013-02-21T20:38:02+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-08-17T03:21:19+00:00\" \/>\n<meta name=\"author\" content=\"Scott Mitchell\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@InMotionHosting\" \/>\n<meta name=\"twitter:site\" content=\"@InMotionHosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Scott Mitchell\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/drupal\/locate-drupal-database-name\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/drupal\/locate-drupal-database-name\/\"},\"author\":{\"name\":\"Scott Mitchell\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/d850efb28ef3573db7d24b0d8fa9eaed\"},\"headline\":\"How to find your Drupal 7 database name\",\"datePublished\":\"2013-02-21T20:38:02+00:00\",\"dateModified\":\"2021-08-17T03:21:19+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/drupal\/locate-drupal-database-name\/\"},\"wordCount\":413,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\"},\"articleSection\":[\"Drupal\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/edu\/drupal\/locate-drupal-database-name\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/drupal\/locate-drupal-database-name\/\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/drupal\/locate-drupal-database-name\/\",\"name\":\"How to find your Drupal 7 database name | InMotion Hosting\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#website\"},\"datePublished\":\"2013-02-21T20:38:02+00:00\",\"dateModified\":\"2021-08-17T03:21:19+00:00\",\"description\":\"Need to know your Drupal 7 database name? Find out with this short tutorial.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/drupal\/locate-drupal-database-name\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/edu\/drupal\/locate-drupal-database-name\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/drupal\/locate-drupal-database-name\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.inmotionhosting.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to find your Drupal 7 database name\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#website\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/\",\"name\":\"InMotion Hosting Support Center\",\"description\":\"Web Hosting Support &amp; Tutorials\",\"publisher\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.inmotionhosting.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\",\"name\":\"InMotion Hosting\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg\",\"contentUrl\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg\",\"width\":696,\"height\":696,\"caption\":\"InMotion Hosting\"},\"image\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/inmotionhosting\/\",\"https:\/\/x.com\/InMotionHosting\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/d850efb28ef3573db7d24b0d8fa9eaed\",\"name\":\"Scott Mitchell\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/author\/scott\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to find your Drupal 7 database name | InMotion Hosting","description":"Need to know your Drupal 7 database name? Find out with this short tutorial.","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.inmotionhosting.com\/support\/edu\/drupal\/locate-drupal-database-name\/","og_locale":"en_US","og_type":"article","og_title":"How to find your Drupal 7 database name | InMotion Hosting","og_description":"Need to know your Drupal 7 database name? Find out with this short tutorial.","og_url":"https:\/\/www.inmotionhosting.com\/support\/edu\/drupal\/locate-drupal-database-name\/","og_site_name":"InMotion Hosting Support Center","article_publisher":"https:\/\/www.facebook.com\/inmotionhosting\/","article_published_time":"2013-02-21T20:38:02+00:00","article_modified_time":"2021-08-17T03:21:19+00:00","author":"Scott Mitchell","twitter_card":"summary_large_image","twitter_creator":"@InMotionHosting","twitter_site":"@InMotionHosting","twitter_misc":{"Written by":"Scott Mitchell","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/drupal\/locate-drupal-database-name\/#article","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/drupal\/locate-drupal-database-name\/"},"author":{"name":"Scott Mitchell","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/d850efb28ef3573db7d24b0d8fa9eaed"},"headline":"How to find your Drupal 7 database name","datePublished":"2013-02-21T20:38:02+00:00","dateModified":"2021-08-17T03:21:19+00:00","mainEntityOfPage":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/drupal\/locate-drupal-database-name\/"},"wordCount":413,"commentCount":0,"publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"articleSection":["Drupal"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.inmotionhosting.com\/support\/edu\/drupal\/locate-drupal-database-name\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/drupal\/locate-drupal-database-name\/","url":"https:\/\/www.inmotionhosting.com\/support\/edu\/drupal\/locate-drupal-database-name\/","name":"How to find your Drupal 7 database name | InMotion Hosting","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#website"},"datePublished":"2013-02-21T20:38:02+00:00","dateModified":"2021-08-17T03:21:19+00:00","description":"Need to know your Drupal 7 database name? Find out with this short tutorial.","breadcrumb":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/drupal\/locate-drupal-database-name\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.inmotionhosting.com\/support\/edu\/drupal\/locate-drupal-database-name\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/drupal\/locate-drupal-database-name\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.inmotionhosting.com\/support\/"},{"@type":"ListItem","position":2,"name":"How to find your Drupal 7 database name"}]},{"@type":"WebSite","@id":"https:\/\/www.inmotionhosting.com\/support\/#website","url":"https:\/\/www.inmotionhosting.com\/support\/","name":"InMotion Hosting Support Center","description":"Web Hosting Support &amp; Tutorials","publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.inmotionhosting.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.inmotionhosting.com\/support\/#organization","name":"InMotion Hosting","url":"https:\/\/www.inmotionhosting.com\/support\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/","url":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","contentUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","width":696,"height":696,"caption":"InMotion Hosting"},"image":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/inmotionhosting\/","https:\/\/x.com\/InMotionHosting"]},{"@type":"Person","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/d850efb28ef3573db7d24b0d8fa9eaed","name":"Scott Mitchell","url":"https:\/\/www.inmotionhosting.com\/support\/author\/scott\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"primary_category":null,"_links":{"self":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/2471","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/comments?post=2471"}],"version-history":[{"count":4,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/2471\/revisions"}],"predecessor-version":[{"id":84934,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/2471\/revisions\/84934"}],"wp:attachment":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/media?parent=2471"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/categories?post=2471"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/tags?post=2471"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}