{"id":2389,"date":"2012-06-22T15:45:52","date_gmt":"2012-06-22T19:45:52","guid":{"rendered":"https:\/\/www.inmotionhosting.com\/support\/2012\/06\/22\/301-troubleshooting-database-link\/"},"modified":"2021-08-16T23:40:31","modified_gmt":"2021-08-17T03:40:31","slug":"troubleshooting-database-link","status":"publish","type":"post","link":"https:\/\/www.inmotionhosting.com\/support\/edu\/prestashop\/troubleshooting-database-link\/","title":{"rendered":"PrestaShop 1.5 &#8211; Error &#8211; Link to database cannot be established"},"content":{"rendered":"<p>If you have a database configuration error, it can display in different ways. If error reporting is not turned on, it will show differently according to the browser.<\/p>\n<table class=\"article_table\">\n<tbody>\n<tr>\n<th>Googe Chrome<\/th>\n<td> The website encountered an error while retrieving https:\/\/domain.com\/ It may be down for maintenance or configured<\/p>\n<\/td>\n<\/tr>\n<tr>\n<th>FireFox<\/th>\n<td>Generally displays a blank page<\/td>\n<\/tr>\n<tr>\n<th>Internet Explorer<\/th>\n<td>\n<p>The website cannot display the page<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>While these messages are fairly general and can be for different errors as well, it is best to then <a href=\"\/support\/edu\/prestashop\/enable-error-reporting\/\">turn on the error reporting<\/a> as shown in a previous article. The error should then display  with the beginning portion reading &#8220;<strong>Fatal error: Uncaught exception &#8216;PrestaShopDatabaseException&#8217; with message &#8216;Link to database cannot be established.<\/strong>&#8221;<\/p>\n<p><strong>To troubleshoot the database configuration: <\/strong><\/p>\n<ol class=\"article_list\">\n<li>Log into your hosting control panel, SSH, or FTP client.<\/li>\n<li>Navigate to the PrestaShop 1.5 root folder.<\/li>\n<li>From there, find your way to the <strong>config <\/strong>folder.<\/li>\n<li>Once in the config folder, locate the file named <strong>settings.inc.php<\/strong> This is the file with all of the database settings.<\/li>\n<li>The table below shows your the four database settings. Ensure that each one is correct. The data shown is sample data, so you will need to know the connection data for your own installation.<br \/> <br \/>\n<table class=\"article_table\">\n<tbody>\n<tr>\n<td> define(&#8216;_DB_SERVER_&#8217;, &#8216;localhost&#8217;);<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>define(&#8216;_DB_NAME_&#8217;, &#8216;your_database_name&#8217;);<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>define(&#8216;_DB_USER_&#8217;, &#8216;your_database_user_name&#8217;);<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>define(&#8216;_DB_PASSWD_&#8217;, &#8216;your_database_password&#8217;);<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/li>\n<li>Once you have corrected the database settings and saved the file, refresh the page to see if the site displays. If so, you may turn off the error reporting.<\/li>\n<\/ol>\n<p>That is how you troubleshoot a database connection error in PrestaShop 1.5.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you have a database configuration error, it can display in different ways. If error reporting is not turned on, it will show differently according to the browser. Googe Chrome The website encountered an error while retrieving https:\/\/domain.com\/ It may be down for maintenance or configured FireFox Generally displays a blank page Internet Explorer The<a class=\"moretag\" href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/prestashop\/troubleshooting-database-link\/\"> 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":[92,4288,4335,4305],"tags":[],"class_list":["post-2389","post","type-post","status-publish","format-standard","hentry","category-prestashop","category-website","category-error-numbers","category-databases"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>PrestaShop 1.5 - Error - Link to database cannot be established | InMotion Hosting<\/title>\n<meta name=\"description\" content=\"Learn how to troubleshoot a database connection error in PrestaShop 1.5\" \/>\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\/prestashop\/troubleshooting-database-link\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"PrestaShop 1.5 - Error - Link to database cannot be established | InMotion Hosting\" \/>\n<meta property=\"og:description\" content=\"Learn how to troubleshoot a database connection error in PrestaShop 1.5\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.inmotionhosting.com\/support\/edu\/prestashop\/troubleshooting-database-link\/\" \/>\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=\"2012-06-22T19:45:52+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-08-17T03:40:31+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=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/prestashop\/troubleshooting-database-link\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/prestashop\/troubleshooting-database-link\/\"},\"author\":{\"name\":\"Scott Mitchell\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/d850efb28ef3573db7d24b0d8fa9eaed\"},\"headline\":\"PrestaShop 1.5 &#8211; Error &#8211; Link to database cannot be established\",\"datePublished\":\"2012-06-22T19:45:52+00:00\",\"dateModified\":\"2021-08-17T03:40:31+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/prestashop\/troubleshooting-database-link\/\"},\"wordCount\":274,\"commentCount\":11,\"publisher\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\"},\"articleSection\":[\"Prestashop\",\"Website\",\"Website Error Numbers\",\"Working with Databases\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/edu\/prestashop\/troubleshooting-database-link\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/prestashop\/troubleshooting-database-link\/\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/prestashop\/troubleshooting-database-link\/\",\"name\":\"PrestaShop 1.5 - Error - Link to database cannot be established | InMotion Hosting\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#website\"},\"datePublished\":\"2012-06-22T19:45:52+00:00\",\"dateModified\":\"2021-08-17T03:40:31+00:00\",\"description\":\"Learn how to troubleshoot a database connection error in PrestaShop 1.5\",\"breadcrumb\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/prestashop\/troubleshooting-database-link\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/edu\/prestashop\/troubleshooting-database-link\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/prestashop\/troubleshooting-database-link\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.inmotionhosting.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"PrestaShop 1.5 &#8211; Error &#8211; Link to database cannot be established\"}]},{\"@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":"PrestaShop 1.5 - Error - Link to database cannot be established | InMotion Hosting","description":"Learn how to troubleshoot a database connection error in PrestaShop 1.5","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\/prestashop\/troubleshooting-database-link\/","og_locale":"en_US","og_type":"article","og_title":"PrestaShop 1.5 - Error - Link to database cannot be established | InMotion Hosting","og_description":"Learn how to troubleshoot a database connection error in PrestaShop 1.5","og_url":"https:\/\/www.inmotionhosting.com\/support\/edu\/prestashop\/troubleshooting-database-link\/","og_site_name":"InMotion Hosting Support Center","article_publisher":"https:\/\/www.facebook.com\/inmotionhosting\/","article_published_time":"2012-06-22T19:45:52+00:00","article_modified_time":"2021-08-17T03:40:31+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":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/prestashop\/troubleshooting-database-link\/#article","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/prestashop\/troubleshooting-database-link\/"},"author":{"name":"Scott Mitchell","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/d850efb28ef3573db7d24b0d8fa9eaed"},"headline":"PrestaShop 1.5 &#8211; Error &#8211; Link to database cannot be established","datePublished":"2012-06-22T19:45:52+00:00","dateModified":"2021-08-17T03:40:31+00:00","mainEntityOfPage":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/prestashop\/troubleshooting-database-link\/"},"wordCount":274,"commentCount":11,"publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"articleSection":["Prestashop","Website","Website Error Numbers","Working with Databases"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.inmotionhosting.com\/support\/edu\/prestashop\/troubleshooting-database-link\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/prestashop\/troubleshooting-database-link\/","url":"https:\/\/www.inmotionhosting.com\/support\/edu\/prestashop\/troubleshooting-database-link\/","name":"PrestaShop 1.5 - Error - Link to database cannot be established | InMotion Hosting","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#website"},"datePublished":"2012-06-22T19:45:52+00:00","dateModified":"2021-08-17T03:40:31+00:00","description":"Learn how to troubleshoot a database connection error in PrestaShop 1.5","breadcrumb":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/prestashop\/troubleshooting-database-link\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.inmotionhosting.com\/support\/edu\/prestashop\/troubleshooting-database-link\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/prestashop\/troubleshooting-database-link\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.inmotionhosting.com\/support\/"},{"@type":"ListItem","position":2,"name":"PrestaShop 1.5 &#8211; Error &#8211; Link to database cannot be established"}]},{"@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\/2389","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=2389"}],"version-history":[{"count":3,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/2389\/revisions"}],"predecessor-version":[{"id":85887,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/2389\/revisions\/85887"}],"wp:attachment":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/media?parent=2389"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/categories?post=2389"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/tags?post=2389"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}