{"id":18307,"date":"2019-06-27T10:48:41","date_gmt":"2019-06-27T16:48:41","guid":{"rendered":"https:\/\/memberpress.com\/?p=18307"},"modified":"2022-02-03T08:39:59","modified_gmt":"2022-02-03T15:39:59","slug":"error-establishing-a-database-connection-in-wordpress-what-it-means-how-to-fix-it","status":"publish","type":"post","link":"https:\/\/memberpress.com\/pt\/blog\/error-establishing-a-database-connection-in-wordpress-what-it-means-how-to-fix-it\/","title":{"rendered":"Como corrigir o \"erro ao estabelecer uma conex\u00e3o com o banco de dados\" no WordPress"},"content":{"rendered":"<p>Neste artigo, abordamos a mensagem comum \"erro ao estabelecer uma conex\u00e3o com o banco de dados no WordPress\" que, \u00e0s vezes, pode ser exibida quando um site n\u00e3o est\u00e1 dispon\u00edvel.<\/p><div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 ez-toc-wrap-center counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<label for=\"ez-toc-cssicon-toggle-item-69d629c878afb\" class=\"ez-toc-cssicon-toggle-label\"><p class=\"ez-toc-title\" style=\"cursor:inherit\">O QUE H\u00c1 DENTRO<\/p>\n<span class=\"ez-toc-cssicon\"><span class=\"eztoc-hide\" style=\"display:none;\">Alternar<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #000000;color:#000000\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #000000;color:#000000\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewbox=\"0 0 24 24\" version=\"1.2\" baseprofile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-69d629c878afb\"  \/><nav><ul class='ez-toc-list ez-toc-list-level-1' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/memberpress.com\/pt\/blog\/error-establishing-a-database-connection-in-wordpress-what-it-means-how-to-fix-it\/#What_Causes_a_WordPress_Database_Connection_Error\" >Quais s\u00e3o as causas de um erro de conex\u00e3o com o banco de dados do WordPress?<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/memberpress.com\/pt\/blog\/error-establishing-a-database-connection-in-wordpress-what-it-means-how-to-fix-it\/#Incorrect_Database_Details\" >Detalhes incorretos do banco de dados<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/memberpress.com\/pt\/blog\/error-establishing-a-database-connection-in-wordpress-what-it-means-how-to-fix-it\/#Corrupted_Database\" >Banco de dados corrompido<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/memberpress.com\/pt\/blog\/error-establishing-a-database-connection-in-wordpress-what-it-means-how-to-fix-it\/#Overloaded_Database_Server\" >Servidor de banco de dados sobrecarregado<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/memberpress.com\/pt\/blog\/error-establishing-a-database-connection-in-wordpress-what-it-means-how-to-fix-it\/#How_to_Fix_a_WordPress_Database_Connection_Error\" >Como corrigir um erro de conex\u00e3o com o banco de dados do WordPress<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/memberpress.com\/pt\/blog\/error-establishing-a-database-connection-in-wordpress-what-it-means-how-to-fix-it\/#Dont_Forget_to_Check_Your_Backups\" >N\u00e3o se esque\u00e7a de verificar seus backups<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/memberpress.com\/pt\/blog\/error-establishing-a-database-connection-in-wordpress-what-it-means-how-to-fix-it\/#Fixing_the_WordPress_Database_Connection_Error\" >Como corrigir o erro de conex\u00e3o com o banco de dados do WordPress<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/memberpress.com\/pt\/blog\/error-establishing-a-database-connection-in-wordpress-what-it-means-how-to-fix-it\/#Incorrect_Database_Details-2\" >Detalhes incorretos do banco de dados<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/memberpress.com\/pt\/blog\/error-establishing-a-database-connection-in-wordpress-what-it-means-how-to-fix-it\/#Overloaded_Database_Server-2\" >Servidor de banco de dados sobrecarregado<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/memberpress.com\/pt\/blog\/error-establishing-a-database-connection-in-wordpress-what-it-means-how-to-fix-it\/#Final_Thoughts\" >Considera\u00e7\u00f5es finais<\/a><\/li><\/ul><\/nav><\/div>\n\n\n\n\n<p>Primeiramente, examinaremos algumas das causas desse erro, antes de explorar as diferentes maneiras de corrigi-lo.<\/p>\n\n\n\n<p>Embora este artigo n\u00e3o se aprofunde muito nos detalhes t\u00e9cnicos por tr\u00e1s das causas desse problema e das maneiras de corrigi-lo, ele deve fornecer uma boa vis\u00e3o geral desse problema para ajud\u00e1-lo a entend\u00ea-lo melhor e a falar sobre ele com mais confian\u00e7a.<\/p>\n\n\n\n<p>Ent\u00e3o, com isso em mente, vamos come\u00e7ar...<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"what-causes-a-wordpress-database-connection-error\"><span class=\"ez-toc-section\" id=\"What_Causes_a_WordPress_Database_Connection_Error\"><\/span>Quais s\u00e3o as causas de um erro de conex\u00e3o com o banco de dados do WordPress?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Ao contr\u00e1rio de alguns erros que voc\u00ea pode ver em um site ou no seu computador, como o erro 404 ou um aviso de que uma opera\u00e7\u00e3o ilegal foi executada, o erro que estamos analisando hoje pelo menos tem um nome autoexplicativo ou uma mensagem de sa\u00edda.<\/p>\n\n\n\n<p>Portanto, quando voc\u00ea v\u00ea a mensagem Error Establishing a Database Connection (Erro ao estabelecer uma conex\u00e3o com o banco de dados) ao tentar acessar um site do WordPress, isso realmente significa que o software do WordPress n\u00e3o consegue se conectar ao seu banco de dados subjacente.<\/p>\n\n\n\n<p>Como esse banco de dados \u00e9 onde todo o conte\u00fado, as configura\u00e7\u00f5es, os arquivos e outros itens do site do WordPress s\u00e3o armazenados, \u00e9 um problema muito grande se o site n\u00e3o conseguir fazer a conex\u00e3o. No entanto, embora seja um problema s\u00e9rio, isso n\u00e3o significa que seu site n\u00e3o possa ser reparado. Como veremos na se\u00e7\u00e3o de solu\u00e7\u00f5es deste guia para entender esse erro do banco de dados do WordPress, ele pode ser corrigido.<\/p>\n\n\n\n<p>Infelizmente, por\u00e9m, as causas desse problema variam e n\u00e3o h\u00e1 uma \u00fanica explica\u00e7\u00e3o para o fato de seu site WordPress n\u00e3o conseguir se conectar ao banco de dados. Al\u00e9m disso, como n\u00e3o h\u00e1 uma \u00fanica causa para esse problema, tamb\u00e9m n\u00e3o h\u00e1 uma \u00fanica solu\u00e7\u00e3o para o erro do banco de dados do WordPress.<\/p>\n\n\n\n<p>No entanto, h\u00e1 algumas causas comuns do erro de conex\u00e3o com o banco de dados do WordPress que abordaremos rapidamente aqui antes de compartilharmos algumas dicas sobre como corrigir esse problema.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"incorrect-database-details\"><span class=\"ez-toc-section\" id=\"Incorrect_Database_Details\"><\/span>Detalhes incorretos do banco de dados<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Uma causa comum desse erro \u00e9 que os detalhes que o WordPress est\u00e1 usando para se conectar ao banco de dados est\u00e3o incorretos, incluindo o nome do banco de dados, o nome de usu\u00e1rio e o <a href=\"https:\/\/memberpress.com\/go\/lastpass\/\" title=\"Link de afiliado do Last Pass\" class=\"pretty-link-keyword\"rel=\"nofollow \" target=\"_blank\">senha<\/a>.<\/p>\n\n\n\n<p>Se o WordPress n\u00e3o conseguir acessar o arquivo que cont\u00e9m esses detalhes - o arquivo wp-config.php - ou se o conte\u00fado desse arquivo n\u00e3o corresponder \u00e0s credenciais do banco de dados, voc\u00ea ver\u00e1 o erro de conex\u00e3o com o banco de dados.<\/p>\n\n\n\n<p>As causas que podem levar ao surgimento desse problema incluem altera\u00e7\u00f5es no nome de usu\u00e1rio ou na senha do banco de dados que n\u00e3o foram refletidas no arquivo wp-config.php, ou a renomea\u00e7\u00e3o, exclus\u00e3o ou corrup\u00e7\u00e3o do pr\u00f3prio arquivo wp-config.php.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"corrupted-database\"><span class=\"ez-toc-section\" id=\"Corrupted_Database\"><\/span>Banco de dados corrompido<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Outra causa desse erro pode ser o fato de o banco de dados ter sido corrompido ou danificado de alguma forma. Se isso acontecer, talvez o WordPress n\u00e3o consiga se conectar a ele, o que faz com que a mensagem de erro ao estabelecer uma conex\u00e3o com o banco de dados seja exibida em vez do site e de seu conte\u00fado.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"overloaded-database-server\"><span class=\"ez-toc-section\" id=\"Overloaded_Database_Server\"><\/span>Servidor de banco de dados sobrecarregado<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Outra causa desse problema pode ser o fato de o servidor que hospeda o banco de dados estar sobrecarregado. Quando isso acontece, os arquivos no servidor podem ficar indispon\u00edveis, causando um erro de conex\u00e3o.<\/p>\n\n\n\n<p>Essa causa \u00e9 especialmente comum se voc\u00ea estiver usando hospedagem compartilhada barata para o seu site WordPress. Com esse tipo de hospedagem, v\u00e1rios sites e seus bancos de dados s\u00e3o armazenados no mesmo servidor, compartilhando os mesmos recursos e aumentando as chances de sobrecarga. Devido a isso, talvez n\u00e3o seja o seu site que esteja causando o problema, mas sim um dos seus vizinhos no mesmo servidor.<\/p>\n\n\n\n<p>A boa not\u00edcia \u00e9 que, se essa for a causa, h\u00e1 uma chance de o erro ser resolvido por si s\u00f3 quando a carga no servidor for reduzida.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"how-to-fix-a-wordpress-database-connection-error\"><span class=\"ez-toc-section\" id=\"How_to_Fix_a_WordPress_Database_Connection_Error\"><\/span>Como corrigir um erro de conex\u00e3o com o banco de dados do WordPress<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Embora seja um grande problema quando um site do WordPress n\u00e3o consegue se conectar ao seu banco de dados - principalmente porque o site fica indispon\u00edvel -, felizmente, esse \u00e9 um problema que pode ser corrigido com frequ\u00eancia.<\/p>\n\n\n\n<p>Embora em muitos casos voc\u00ea possa resolver esse problema por conta pr\u00f3pria, o primeiro ponto de contato deve ser o seu <a href=\"https:\/\/memberpress.com\/go\/wpe\/pricing\/\" title=\"Link de afiliado do WPengine\" class=\"pretty-link-keyword\"rel=\"nofollow \" target=\"_blank\">hospedagem na web<\/a> suporte t\u00e9cnico. A maioria dos bons hosts da Web tem um canal de suporte priorit\u00e1rio que voc\u00ea pode usar se o seu site estiver indispon\u00edvel, o que acontecer\u00e1 se a mensagem de erro ao estabelecer uma conex\u00e3o com o banco de dados for exibida. Mas seja qual for o seu n\u00edvel de servi\u00e7o, entre em contato com o help desk do seu host da Web pelo m\u00e9todo mais responsivo, que geralmente \u00e9 <a href=\"https:\/\/memberpress.com\/go\/livechat\/\" title=\"Link de afiliado do Livechat\" class=\"pretty-link-keyword\"rel=\"nofollow \" target=\"_blank\">bate-papo ao vivo<\/a> ou por telefone.<\/p>\n\n\n\n<p>Se voc\u00ea quiser tentar resolver o problema por conta pr\u00f3pria, as dicas abaixo devem ajud\u00e1-lo a solucionar esse problema.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"don-t-forget-to-check-your-backups\"><span class=\"ez-toc-section\" id=\"Dont_Forget_to_Check_Your_Backups\"><\/span>N\u00e3o se esque\u00e7a de verificar seus backups<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Antes de come\u00e7ar a tentar corrigir esse problema, verifique se voc\u00ea tem um backup funcional do seu site WordPress e do banco de dados. Se voc\u00ea estiver usando um dos <a href=\"https:\/\/memberpress.com\/pt\/best-backup-plugins-for-your-wordpress-membership-site\/\">nossas solu\u00e7\u00f5es de backup recomendadas para WordPress<\/a>Se o seu site n\u00e3o estiver em boas condi\u00e7\u00f5es, \u00e9 bem prov\u00e1vel que voc\u00ea j\u00e1 tenha um arquivo do seu site para usar caso algo d\u00ea errado ou se voc\u00ea n\u00e3o conseguir corrigir o erro de conex\u00e3o com o banco de dados. Sua estrat\u00e9gia de backup deve incluir o teste dos backups para garantir que seja poss\u00edvel restaur\u00e1-los quando necess\u00e1rio.<\/p>\n\n\n\n<p>Se n\u00e3o tiver feito backup do seu site WordPress, tente entrar em contato com o seu host da Web para ver se ele tem feito backups do site em seu nome.<\/p>\n\n\n\n<p>Se n\u00e3o houver nenhum backup recente do seu site, voc\u00ea ainda poder\u00e1 fazer um. Embora n\u00e3o seja poss\u00edvel fazer login no painel do WordPress para criar um backup quando estiver vendo a mensagem de erro de conex\u00e3o com o banco de dados, voc\u00ea pode criar um backup no n\u00edvel do servidor, usando as ferramentas fornecidas pelo seu host da Web. Essas ferramentas geralmente podem ser encontradas no cPanel. Novamente, entre em contato com o seu host da Web se n\u00e3o tiver certeza de como criar um backup fora do WordPress.<\/p>\n\n\n\n<p>Todos os backups criados ap\u00f3s a ocorr\u00eancia do erro de conex\u00e3o com o banco de dados ainda conter\u00e3o o erro, mas, pelo menos, se voc\u00ea cometer algum erro ao tentar corrigir o problema, poder\u00e1 voltar ao momento em que criou o backup e tentar novamente.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"fixing-the-wordpress-database-connection-error\"><span class=\"ez-toc-section\" id=\"Fixing_the_WordPress_Database_Connection_Error\"><\/span>Como corrigir o erro de conex\u00e3o com o banco de dados do WordPress<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Portanto, agora que voc\u00ea tem seus arquivos de backup em algum lugar seguro e acess\u00edvel, aqui est\u00e3o algumas maneiras de corrigir o erro ao estabelecer uma conex\u00e3o com o banco de dados no problema do WordPress.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"incorrect-database-details\"><span class=\"ez-toc-section\" id=\"Incorrect_Database_Details-2\"><\/span>Detalhes incorretos do banco de dados<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Conforme mencionado anteriormente, se os detalhes, como o nome do banco de dados, o nome de usu\u00e1rio e a senha, no arquivo wp-config.php n\u00e3o corresponderem aos detalhes reais do seu banco de dados, o WordPress n\u00e3o conseguir\u00e1 se conectar ao banco de dados.<\/p>\n\n\n\n<p>Portanto, para verificar se essa incompatibilidade \u00e9 a causa do erro, voc\u00ea precisar\u00e1 localizar e abrir o arquivo wp-config.php e verificar esses detalhes por conta pr\u00f3pria. O arquivo wp-config.php pode ser encontrado no diret\u00f3rio raiz do seu site no servidor em que ele est\u00e1 hospedado. Para acessar essa \u00e1rea, voc\u00ea precisar\u00e1 fazer login no servidor via FTP ou usar um gerenciador de arquivos on-line para acessar o arquivo.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"1600\" height=\"892\" src=\"https:\/\/memberpress.com\/wp-content\/uploads\/2019\/06\/Database-Error-File-Manager.png\" alt=\"Gerenciador de arquivos\" class=\"wp-image-18310\" srcset=\"https:\/\/memberpress.com\/wp-content\/uploads\/2019\/06\/Database-Error-File-Manager.png 1600w, https:\/\/memberpress.com\/wp-content\/uploads\/2019\/06\/Database-Error-File-Manager-300x167.png 300w, https:\/\/memberpress.com\/wp-content\/uploads\/2019\/06\/Database-Error-File-Manager-1024x571.png 1024w, https:\/\/memberpress.com\/wp-content\/uploads\/2019\/06\/Database-Error-File-Manager-768x428.png 768w, https:\/\/memberpress.com\/wp-content\/uploads\/2019\/06\/Database-Error-File-Manager-1536x856.png 1536w, https:\/\/memberpress.com\/wp-content\/uploads\/2019\/06\/Database-Error-File-Manager-305x170.png 305w, https:\/\/memberpress.com\/wp-content\/uploads\/2019\/06\/Database-Error-File-Manager-840x468.png 840w, https:\/\/memberpress.com\/wp-content\/uploads\/2019\/06\/Database-Error-File-Manager-1216x678.png 1216w, https:\/\/memberpress.com\/wp-content\/uploads\/2019\/06\/Database-Error-File-Manager-700x390.png 700w, https:\/\/memberpress.com\/wp-content\/uploads\/2019\/06\/Database-Error-File-Manager-156x87.png 156w, https:\/\/memberpress.com\/wp-content\/uploads\/2019\/06\/Database-Error-File-Manager-1080x602.png 1080w\" sizes=\"(max-width: 1600px) 100vw, 1600px\" \/><\/figure>\n\n\n\n<p>Se n\u00e3o tiver certeza de como fazer isso, ser\u00e1 necess\u00e1rio encontrar a documenta\u00e7\u00e3o fornecida pelo seu host ou entrar em contato com a equipe de suporte.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"1400\" height=\"832\" src=\"https:\/\/memberpress.com\/wp-content\/uploads\/2019\/06\/Database-Error-FTP.png\" alt=\"Servidor FTP\" class=\"wp-image-18311\" srcset=\"https:\/\/memberpress.com\/wp-content\/uploads\/2019\/06\/Database-Error-FTP.png 1400w, https:\/\/memberpress.com\/wp-content\/uploads\/2019\/06\/Database-Error-FTP-300x178.png 300w, https:\/\/memberpress.com\/wp-content\/uploads\/2019\/06\/Database-Error-FTP-1024x609.png 1024w, https:\/\/memberpress.com\/wp-content\/uploads\/2019\/06\/Database-Error-FTP-768x456.png 768w, https:\/\/memberpress.com\/wp-content\/uploads\/2019\/06\/Database-Error-FTP-286x170.png 286w, https:\/\/memberpress.com\/wp-content\/uploads\/2019\/06\/Database-Error-FTP-840x499.png 840w, https:\/\/memberpress.com\/wp-content\/uploads\/2019\/06\/Database-Error-FTP-1151x684.png 1151w, https:\/\/memberpress.com\/wp-content\/uploads\/2019\/06\/Database-Error-FTP-700x416.png 700w, https:\/\/memberpress.com\/wp-content\/uploads\/2019\/06\/Database-Error-FTP-156x93.png 156w, https:\/\/memberpress.com\/wp-content\/uploads\/2019\/06\/Database-Error-FTP-1080x642.png 1080w\" sizes=\"(max-width: 1400px) 100vw, 1400px\" \/><\/figure>\n\n\n\n<p>Depois de encontrar o arquivo, certifique-se de criar um backup dele antes de fazer qualquer altera\u00e7\u00e3o. Feito isso, abra o arquivo para edi\u00e7\u00e3o, seja baixando-o do servidor ou por meio da interface do gerenciador de arquivos.<\/p>\n\n\n\n<p>Como mostra a imagem abaixo, as linhas que voc\u00ea est\u00e1 procurando come\u00e7am com \/\/ ** Configura\u00e7\u00f5es do MySQL - Voc\u00ea pode obter essas informa\u00e7\u00f5es no seu host da Web ** \/\/<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"1260\" height=\"442\" src=\"https:\/\/memberpress.com\/wp-content\/uploads\/2019\/06\/Database-Error-Editing.png\" alt=\"Entrada WP-Config.php do MySQL\" class=\"wp-image-18312\" srcset=\"https:\/\/memberpress.com\/wp-content\/uploads\/2019\/06\/Database-Error-Editing.png 1260w, https:\/\/memberpress.com\/wp-content\/uploads\/2019\/06\/Database-Error-Editing-300x105.png 300w, https:\/\/memberpress.com\/wp-content\/uploads\/2019\/06\/Database-Error-Editing-1024x359.png 1024w, https:\/\/memberpress.com\/wp-content\/uploads\/2019\/06\/Database-Error-Editing-768x269.png 768w, https:\/\/memberpress.com\/wp-content\/uploads\/2019\/06\/Database-Error-Editing-485x170.png 485w, https:\/\/memberpress.com\/wp-content\/uploads\/2019\/06\/Database-Error-Editing-840x295.png 840w, https:\/\/memberpress.com\/wp-content\/uploads\/2019\/06\/Database-Error-Editing-1216x427.png 1216w, https:\/\/memberpress.com\/wp-content\/uploads\/2019\/06\/Database-Error-Editing-700x246.png 700w, https:\/\/memberpress.com\/wp-content\/uploads\/2019\/06\/Database-Error-Editing-156x55.png 156w, https:\/\/memberpress.com\/wp-content\/uploads\/2019\/06\/Database-Error-Editing-1080x379.png 1080w\" sizes=\"(max-width: 1260px) 100vw, 1260px\" \/><\/figure>\n\n\n\n<p>Nessa se\u00e7\u00e3o do arquivo wp-config.php, voc\u00ea pode ver os seguintes detalhes:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>O nome do banco de dados: DB_NAME<\/li><li>O nome de usu\u00e1rio do banco de dados: DB_USER<\/li><li>A senha do banco de dados: DB_PASSWORD<\/li><li>O nome do host do banco de dados: DB_HOST<\/li><\/ul>\n\n\n\n<p>Agora voc\u00ea precisar\u00e1 verificar se esses detalhes correspondem aos detalhes do banco de dados. Para fazer isso, voc\u00ea precisar\u00e1 acessar o banco de dados. Suas op\u00e7\u00f5es aqui ser\u00e3o definidas pelo seu host da Web. Mas uma forma popular de acessar o banco de dados \u00e9 por meio do painel de controle da hospedagem na Web, como a ferramenta phpMyAdmin encontrada na interface do cPanel.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"1550\" height=\"313\" src=\"https:\/\/memberpress.com\/wp-content\/uploads\/2019\/06\/Database-Error-cPanel-Database-Tools.png\" alt=\"Ferramentas de banco de dados do cPanel\" class=\"wp-image-18313\" srcset=\"https:\/\/memberpress.com\/wp-content\/uploads\/2019\/06\/Database-Error-cPanel-Database-Tools.png 1550w, https:\/\/memberpress.com\/wp-content\/uploads\/2019\/06\/Database-Error-cPanel-Database-Tools-300x61.png 300w, https:\/\/memberpress.com\/wp-content\/uploads\/2019\/06\/Database-Error-cPanel-Database-Tools-1024x207.png 1024w, https:\/\/memberpress.com\/wp-content\/uploads\/2019\/06\/Database-Error-cPanel-Database-Tools-768x155.png 768w, https:\/\/memberpress.com\/wp-content\/uploads\/2019\/06\/Database-Error-cPanel-Database-Tools-1536x310.png 1536w, https:\/\/memberpress.com\/wp-content\/uploads\/2019\/06\/Database-Error-cPanel-Database-Tools-660x133.png 660w, https:\/\/memberpress.com\/wp-content\/uploads\/2019\/06\/Database-Error-cPanel-Database-Tools-840x170.png 840w, https:\/\/memberpress.com\/wp-content\/uploads\/2019\/06\/Database-Error-cPanel-Database-Tools-1216x246.png 1216w, https:\/\/memberpress.com\/wp-content\/uploads\/2019\/06\/Database-Error-cPanel-Database-Tools-700x141.png 700w, https:\/\/memberpress.com\/wp-content\/uploads\/2019\/06\/Database-Error-cPanel-Database-Tools-156x32.png 156w, https:\/\/memberpress.com\/wp-content\/uploads\/2019\/06\/Database-Error-cPanel-Database-Tools-1080x218.png 1080w\" sizes=\"(max-width: 1550px) 100vw, 1550px\" \/><\/figure>\n\n\n\n<p>Depois de iniciar o phpMyAdmin para acessar o banco de dados, voc\u00ea precisa confirmar os detalhes do arquivo wp-config.php que acabamos de abordar. Essa talvez seja a parte mais dif\u00edcil do processo, portanto, \u00e9 melhor consultar <a href=\"https:\/\/kinsta.com\/blog\/error-establishing-a-database-connection\/\">este guia no blog da Kinsta<\/a> que aborda como verificar as credenciais do seu banco de dados do WordPress para ver se elas correspondem aos detalhes do seu arquivo wp-config.php.<\/p>\n\n\n\n<p>Se, a essa altura, voc\u00ea preferir procurar o suporte do seu host da Web em vez de prosseguir por conta pr\u00f3pria, poder\u00e1 enviar \u00e0 equipe do help desk os detalhes do banco de dados do seu arquivo wp-config.php para ajud\u00e1-la a come\u00e7ar.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"overloaded-database-server\"><span class=\"ez-toc-section\" id=\"Overloaded_Database_Server-2\"><\/span>Servidor de banco de dados sobrecarregado<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Se a causa do erro de conex\u00e3o com o banco de dados for um servidor sobrecarregado, h\u00e1 uma boa chance de que o problema se resolva sozinho quando a carga sobre o servidor diminuir.<\/p>\n\n\n\n<p>Infelizmente, n\u00e3o h\u00e1 uma maneira r\u00e1pida e f\u00e1cil de determinar se essa \u00e9 a causa do erro. Embora os dados do Google Analytics possam revelar que seu site est\u00e1 sofrendo um aumento no tr\u00e1fego, pode ser um dos outros sites hospedados no mesmo servidor que est\u00e1 causando a sobrecarga.<\/p>\n\n\n\n<p>Se voc\u00ea entrar em contato com a equipe de suporte do seu host da Web, ela poder\u00e1 informar se essa \u00e9 a causa do seu problema.<\/p>\n\n\n\n<p>Se um servidor sobrecarregado estiver causando tempo de inatividade para o seu site, talvez seja hora de considerar a mudan\u00e7a do seu plano de hospedagem. Uma op\u00e7\u00e3o seria fazer o upgrade para um plano superior com seu provedor atual, ou <a href=\"https:\/\/memberpress.com\/pt\/how-to-choose-the-best-web-hosting-for-your-membership-site\/\">Mudan\u00e7a para um host da Web melhor<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"final-thoughts\"><span class=\"ez-toc-section\" id=\"Final_Thoughts\"><\/span>Considera\u00e7\u00f5es finais<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Esperamos que este artigo tenha esclarecido o infame erro ao estabelecer um problema de conex\u00e3o com o banco de dados que pode afetar os sites do WordPress de tempos em tempos.<\/p>\n\n\n\n<p>Na maioria dos casos, a melhor op\u00e7\u00e3o \u00e9 entrar em contato com o host da Web e instru\u00ed-lo a resolver o problema. Entretanto, as informa\u00e7\u00f5es deste artigo devem ter lhe dado uma ideia melhor da causa do problema e de algumas maneiras de corrigi-lo.\u00a0<\/p>\n\n\n\n<p>Consertar seu site por conta pr\u00f3pria pode ser gratificante. Mas, na maioria dos casos, \u00e9 melhor deixar para os profissionais.<\/p>\n\n\n\n<p><em>Seu site j\u00e1 exibiu a mensagem de erro ao estabelecer uma conex\u00e3o com o banco de dados? Se sim, o que voc\u00ea fez para resolver o problema? Informe-nos nos coment\u00e1rios abaixo. <\/em><\/p>","protected":false},"excerpt":{"rendered":"<p>In this article we cover the common \u201cerror establish a database connection in WordPress\u201d message that can sometimes be displayed when a website is unavailable. First up, we look at some of the causes of this error, before exploring the different ways it can be fixed. Although this article doesn\u2019t dive too deeply into the [\u2026]<\/p>\n","protected":false},"author":2122,"featured_media":33261,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"om_disable_all_campaigns":false,"_strive_editorial_status":"not-started","_strive_copy_of":0,"inline_featured_image":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","_FSMCFIC_featured_image_caption":"","_FSMCFIC_featured_image_nocaption":"","_FSMCFIC_featured_image_hide":"","_strive_checklists":"\"\"","_strive_active_checklist":"62291e2bb2422","_strive_post_notes":"","footnotes":""},"categories":[69],"tags":[72,508],"class_list":{"0":"post-18307","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-advice","8":"tag-support","9":"tag-troubleshooting","10":"entry"},"acf":{"plans":["scale"],"is_featured":false,"download_source":"none","mothership_slug":"","download_url":""},"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO Pro 4.9.5.2 - aioseo.com -->\n\t<meta name=\"description\" content=\"Find out more about the Error Establishing a Database Connection issue in WordPress and how it can be diagnosed and fixed.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Joe Fylan\"\/>\n\t<meta name=\"keywords\" content=\"wordpress database error,,support,troubleshooting\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/memberpress.com\/pt\/blog\/error-establishing-a-database-connection-in-wordpress-what-it-means-how-to-fix-it\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO Pro (AIOSEO) 4.9.5.2\" \/>\n\t\t<meta property=\"og:locale\" content=\"pt_BR\" \/>\n\t\t<meta property=\"og:site_name\" content=\"MemberPress\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Error Establishing a Database Connection in WordPress\" \/>\n\t\t<meta property=\"og:description\" content=\"Find out more about the Error Establishing a Database Connection issue in WordPress and how it can be diagnosed and fixed.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/memberpress.com\/pt\/blog\/error-establishing-a-database-connection-in-wordpress-what-it-means-how-to-fix-it\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/memberpress.com\/wp-content\/uploads\/2019\/06\/wp-trouble.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/memberpress.com\/wp-content\/uploads\/2019\/06\/wp-trouble.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"1480\" \/>\n\t\t<meta property=\"og:image:height\" content=\"832\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2019-06-27T16:48:41+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2022-02-03T15:39:59+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/memberpress\/\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@memberpress\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Error Establishing a Database Connection in WordPress\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Find out more about the Error Establishing a Database Connection issue in WordPress and how it can be diagnosed and fixed.\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/memberpress.com\/wp-content\/uploads\/2019\/06\/wp-trouble.jpg\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BlogPosting\",\"@id\":\"https:\\\/\\\/memberpress.com\\\/pt\\\/blog\\\/error-establishing-a-database-connection-in-wordpress-what-it-means-how-to-fix-it\\\/#blogposting\",\"name\":\"Error Establishing a Database Connection in WordPress\",\"headline\":\"How to Fix the \\u201cError Establishing a Database Connection\\u201d in WordPress\",\"author\":{\"@id\":\"https:\\\/\\\/memberpress.com\\\/pt\\\/blog\\\/author\\\/jfylan\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/memberpress.com\\\/pt\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/memberpress.com\\\/wp-content\\\/uploads\\\/2019\\\/06\\\/wp-trouble.jpg\",\"width\":1480,\"height\":832,\"caption\":\"WordPress troubleshooting image\"},\"datePublished\":\"2019-06-27T10:48:41-04:00\",\"dateModified\":\"2022-02-03T08:39:59-05:00\",\"inLanguage\":\"pt-BR\",\"commentCount\":1,\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/memberpress.com\\\/pt\\\/blog\\\/error-establishing-a-database-connection-in-wordpress-what-it-means-how-to-fix-it\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/memberpress.com\\\/pt\\\/blog\\\/error-establishing-a-database-connection-in-wordpress-what-it-means-how-to-fix-it\\\/#webpage\"},\"articleSection\":\"Advice, Support, troubleshooting\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/memberpress.com\\\/pt\\\/blog\\\/error-establishing-a-database-connection-in-wordpress-what-it-means-how-to-fix-it\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/memberpress.com\\\/pt#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/memberpress.com\\\/pt\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/memberpress.com\\\/pt\\\/blog\\\/category\\\/advice\\\/#listItem\",\"name\":\"Advice\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/memberpress.com\\\/pt\\\/blog\\\/category\\\/advice\\\/#listItem\",\"position\":2,\"name\":\"Advice\",\"item\":\"https:\\\/\\\/memberpress.com\\\/pt\\\/blog\\\/category\\\/advice\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/memberpress.com\\\/pt\\\/blog\\\/error-establishing-a-database-connection-in-wordpress-what-it-means-how-to-fix-it\\\/#listItem\",\"name\":\"How to Fix the \\u201cError Establishing a Database Connection\\u201d in WordPress\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/memberpress.com\\\/pt#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/memberpress.com\\\/pt\\\/blog\\\/error-establishing-a-database-connection-in-wordpress-what-it-means-how-to-fix-it\\\/#listItem\",\"position\":3,\"name\":\"How to Fix the \\u201cError Establishing a Database Connection\\u201d in WordPress\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/memberpress.com\\\/pt\\\/blog\\\/category\\\/advice\\\/#listItem\",\"name\":\"Advice\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/memberpress.com\\\/pt\\\/#organization\",\"name\":\"MemberPress\",\"description\":\"The All-In-One WordPress Membership Plugin\",\"url\":\"https:\\\/\\\/memberpress.com\\\/pt\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/memberpress.com\\\/wp-content\\\/uploads\\\/2022\\\/10\\\/mp-icon-RGB_Icon-01.jpg\",\"@id\":\"https:\\\/\\\/memberpress.com\\\/pt\\\/blog\\\/error-establishing-a-database-connection-in-wordpress-what-it-means-how-to-fix-it\\\/#organizationLogo\",\"width\":1650,\"height\":1275,\"caption\":\"memberpress logo icon\"},\"image\":{\"@id\":\"https:\\\/\\\/memberpress.com\\\/pt\\\/blog\\\/error-establishing-a-database-connection-in-wordpress-what-it-means-how-to-fix-it\\\/#organizationLogo\"},\"sameAs\":[\"https:\\\/\\\/www.instagram.com\\\/memberpress\\\/\",\"https:\\\/\\\/www.pinterest.com\\\/memberpressplugin\\\/\",\"https:\\\/\\\/www.youtube.com\\\/c\\\/MemberPressPlugin\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/memberpress\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/memberpress.com\\\/pt\\\/blog\\\/author\\\/jfylan\\\/#author\",\"url\":\"https:\\\/\\\/memberpress.com\\\/pt\\\/blog\\\/author\\\/jfylan\\\/\",\"name\":\"Joe Fylan\",\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/memberpress.com\\\/wp-content\\\/litespeed\\\/avatar\\\/8efbb5b67aecb906b5f72f49bd070141.jpg?ver=1775143381\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/memberpress.com\\\/pt\\\/blog\\\/error-establishing-a-database-connection-in-wordpress-what-it-means-how-to-fix-it\\\/#webpage\",\"url\":\"https:\\\/\\\/memberpress.com\\\/pt\\\/blog\\\/error-establishing-a-database-connection-in-wordpress-what-it-means-how-to-fix-it\\\/\",\"name\":\"Error Establishing a Database Connection in WordPress\",\"description\":\"Find out more about the Error Establishing a Database Connection issue in WordPress and how it can be diagnosed and fixed.\",\"inLanguage\":\"pt-BR\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/memberpress.com\\\/pt\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/memberpress.com\\\/pt\\\/blog\\\/error-establishing-a-database-connection-in-wordpress-what-it-means-how-to-fix-it\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/memberpress.com\\\/pt\\\/blog\\\/author\\\/jfylan\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/memberpress.com\\\/pt\\\/blog\\\/author\\\/jfylan\\\/#author\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/memberpress.com\\\/wp-content\\\/uploads\\\/2019\\\/06\\\/wp-trouble.jpg\",\"@id\":\"https:\\\/\\\/memberpress.com\\\/pt\\\/blog\\\/error-establishing-a-database-connection-in-wordpress-what-it-means-how-to-fix-it\\\/#mainImage\",\"width\":1480,\"height\":832,\"caption\":\"WordPress troubleshooting image\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/memberpress.com\\\/pt\\\/blog\\\/error-establishing-a-database-connection-in-wordpress-what-it-means-how-to-fix-it\\\/#mainImage\"},\"datePublished\":\"2019-06-27T10:48:41-04:00\",\"dateModified\":\"2022-02-03T08:39:59-05:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/memberpress.com\\\/pt\\\/#website\",\"url\":\"https:\\\/\\\/memberpress.com\\\/pt\\\/\",\"name\":\"MemberPress\",\"description\":\"The All-In-One WordPress Membership Plugin\",\"inLanguage\":\"pt-BR\",\"publisher\":{\"@id\":\"https:\\\/\\\/memberpress.com\\\/pt\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO Pro -->\r\n\t\t<title>Error Establishing a Database Connection in WordPress<\/title>\n\n","aioseo_head_json":{"title":"Erro ao estabelecer uma conex\u00e3o com o banco de dados no WordPress","description":"Saiba mais sobre o problema Erro ao estabelecer uma conex\u00e3o com o banco de dados no WordPress e como ele pode ser diagnosticado e corrigido.","canonical_url":"https:\/\/memberpress.com\/pt\/blog\/error-establishing-a-database-connection-in-wordpress-what-it-means-how-to-fix-it\/","robots":"max-image-preview:large","keywords":"wordpress database error,,support,troubleshooting","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BlogPosting","@id":"https:\/\/memberpress.com\/pt\/blog\/error-establishing-a-database-connection-in-wordpress-what-it-means-how-to-fix-it\/#blogposting","name":"Error Establishing a Database Connection in WordPress","headline":"How to Fix the \u201cError Establishing a Database Connection\u201d in WordPress","author":{"@id":"https:\/\/memberpress.com\/pt\/blog\/author\/jfylan\/#author"},"publisher":{"@id":"https:\/\/memberpress.com\/pt\/#organization"},"image":{"@type":"ImageObject","url":"https:\/\/memberpress.com\/wp-content\/uploads\/2019\/06\/wp-trouble.jpg","width":1480,"height":832,"caption":"WordPress troubleshooting image"},"datePublished":"2019-06-27T10:48:41-04:00","dateModified":"2022-02-03T08:39:59-05:00","inLanguage":"pt-BR","commentCount":1,"mainEntityOfPage":{"@id":"https:\/\/memberpress.com\/pt\/blog\/error-establishing-a-database-connection-in-wordpress-what-it-means-how-to-fix-it\/#webpage"},"isPartOf":{"@id":"https:\/\/memberpress.com\/pt\/blog\/error-establishing-a-database-connection-in-wordpress-what-it-means-how-to-fix-it\/#webpage"},"articleSection":"Advice, Support, troubleshooting"},{"@type":"BreadcrumbList","@id":"https:\/\/memberpress.com\/pt\/blog\/error-establishing-a-database-connection-in-wordpress-what-it-means-how-to-fix-it\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/memberpress.com\/pt#listItem","position":1,"name":"Home","item":"https:\/\/memberpress.com\/pt","nextItem":{"@type":"ListItem","@id":"https:\/\/memberpress.com\/pt\/blog\/category\/advice\/#listItem","name":"Advice"}},{"@type":"ListItem","@id":"https:\/\/memberpress.com\/pt\/blog\/category\/advice\/#listItem","position":2,"name":"Advice","item":"https:\/\/memberpress.com\/pt\/blog\/category\/advice\/","nextItem":{"@type":"ListItem","@id":"https:\/\/memberpress.com\/pt\/blog\/error-establishing-a-database-connection-in-wordpress-what-it-means-how-to-fix-it\/#listItem","name":"How to Fix the \u201cError Establishing a Database Connection\u201d in WordPress"},"previousItem":{"@type":"ListItem","@id":"https:\/\/memberpress.com\/pt#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/memberpress.com\/pt\/blog\/error-establishing-a-database-connection-in-wordpress-what-it-means-how-to-fix-it\/#listItem","position":3,"name":"How to Fix the \u201cError Establishing a Database Connection\u201d in WordPress","previousItem":{"@type":"ListItem","@id":"https:\/\/memberpress.com\/pt\/blog\/category\/advice\/#listItem","name":"Advice"}}]},{"@type":"Organization","@id":"https:\/\/memberpress.com\/pt\/#organization","name":"MemberPress","description":"The All-In-One WordPress Membership Plugin","url":"https:\/\/memberpress.com\/pt\/","logo":{"@type":"ImageObject","url":"https:\/\/memberpress.com\/wp-content\/uploads\/2022\/10\/mp-icon-RGB_Icon-01.jpg","@id":"https:\/\/memberpress.com\/pt\/blog\/error-establishing-a-database-connection-in-wordpress-what-it-means-how-to-fix-it\/#organizationLogo","width":1650,"height":1275,"caption":"memberpress logo icon"},"image":{"@id":"https:\/\/memberpress.com\/pt\/blog\/error-establishing-a-database-connection-in-wordpress-what-it-means-how-to-fix-it\/#organizationLogo"},"sameAs":["https:\/\/www.instagram.com\/memberpress\/","https:\/\/www.pinterest.com\/memberpressplugin\/","https:\/\/www.youtube.com\/c\/MemberPressPlugin","https:\/\/www.linkedin.com\/company\/memberpress\/"]},{"@type":"Person","@id":"https:\/\/memberpress.com\/pt\/blog\/author\/jfylan\/#author","url":"https:\/\/memberpress.com\/pt\/blog\/author\/jfylan\/","name":"Joe Fylan","image":{"@type":"ImageObject","url":"https:\/\/memberpress.com\/wp-content\/litespeed\/avatar\/8efbb5b67aecb906b5f72f49bd070141.jpg?ver=1775143381"}},{"@type":"WebPage","@id":"https:\/\/memberpress.com\/pt\/blog\/error-establishing-a-database-connection-in-wordpress-what-it-means-how-to-fix-it\/#webpage","url":"https:\/\/memberpress.com\/pt\/blog\/error-establishing-a-database-connection-in-wordpress-what-it-means-how-to-fix-it\/","name":"Error Establishing a Database Connection in WordPress","description":"Find out more about the Error Establishing a Database Connection issue in WordPress and how it can be diagnosed and fixed.","inLanguage":"pt-BR","isPartOf":{"@id":"https:\/\/memberpress.com\/pt\/#website"},"breadcrumb":{"@id":"https:\/\/memberpress.com\/pt\/blog\/error-establishing-a-database-connection-in-wordpress-what-it-means-how-to-fix-it\/#breadcrumblist"},"author":{"@id":"https:\/\/memberpress.com\/pt\/blog\/author\/jfylan\/#author"},"creator":{"@id":"https:\/\/memberpress.com\/pt\/blog\/author\/jfylan\/#author"},"image":{"@type":"ImageObject","url":"https:\/\/memberpress.com\/wp-content\/uploads\/2019\/06\/wp-trouble.jpg","@id":"https:\/\/memberpress.com\/pt\/blog\/error-establishing-a-database-connection-in-wordpress-what-it-means-how-to-fix-it\/#mainImage","width":1480,"height":832,"caption":"WordPress troubleshooting image"},"primaryImageOfPage":{"@id":"https:\/\/memberpress.com\/pt\/blog\/error-establishing-a-database-connection-in-wordpress-what-it-means-how-to-fix-it\/#mainImage"},"datePublished":"2019-06-27T10:48:41-04:00","dateModified":"2022-02-03T08:39:59-05:00"},{"@type":"WebSite","@id":"https:\/\/memberpress.com\/pt\/#website","url":"https:\/\/memberpress.com\/pt\/","name":"MemberPress","description":"The All-In-One WordPress Membership Plugin","inLanguage":"pt-BR","publisher":{"@id":"https:\/\/memberpress.com\/pt\/#organization"}}]},"og:locale":"pt_BR","og:site_name":"MemberPress","og:type":"article","og:title":"Error Establishing a Database Connection in WordPress","og:description":"Find out more about the Error Establishing a Database Connection issue in WordPress and how it can be diagnosed and fixed.","og:url":"https:\/\/memberpress.com\/pt\/blog\/error-establishing-a-database-connection-in-wordpress-what-it-means-how-to-fix-it\/","og:image":"https:\/\/memberpress.com\/wp-content\/uploads\/2019\/06\/wp-trouble.jpg","og:image:secure_url":"https:\/\/memberpress.com\/wp-content\/uploads\/2019\/06\/wp-trouble.jpg","og:image:width":1480,"og:image:height":832,"article:published_time":"2019-06-27T16:48:41+00:00","article:modified_time":"2022-02-03T15:39:59+00:00","article:publisher":"https:\/\/www.facebook.com\/memberpress\/","twitter:card":"summary_large_image","twitter:site":"@memberpress","twitter:title":"Error Establishing a Database Connection in WordPress","twitter:description":"Find out more about the Error Establishing a Database Connection issue in WordPress and how it can be diagnosed and fixed.","twitter:image":"https:\/\/memberpress.com\/wp-content\/uploads\/2019\/06\/wp-trouble.jpg"},"aioseo_meta_data":{"post_id":"18307","title":"Erro ao estabelecer uma conex\u00e3o com o banco de dados no WordPress","description":"Saiba mais sobre o problema Erro ao estabelecer uma conex\u00e3o com o banco de dados no WordPress e como ele pode ser diagnosticado e corrigido.","keywords":[{"label":"WordPress database error,","value":"WordPress database error,"}],"keyphrases":{"focus":{"keyphrase":"","score":0,"analysis":{"keyphraseInTitle":{"score":0,"maxScore":9,"error":1}}},"additional":[]},"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":null,"og_article_tags":[],"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[],"defaultGraph":"Article","defaultPostTypeGraph":""},"schema_type":"default","schema_type_options":"{\"article\":{\"articleType\":\"BlogPosting\"},\"course\":{\"name\":\"\",\"description\":\"\",\"provider\":\"\"},\"faq\":{\"pages\":[]},\"product\":{\"reviews\":[]},\"recipe\":{\"ingredients\":[],\"instructions\":[],\"keywords\":[]},\"software\":{\"reviews\":[],\"operatingSystems\":[]},\"webPage\":{\"webPageType\":\"WebPage\"}}","pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":"-1","robots_max_videopreview":"-1","robots_max_imagepreview":"large","priority":null,"frequency":"default","local_seo":null,"seo_analyzer_scan_date":"2025-10-09 17:53:12","breadcrumb_settings":null,"limit_modified_date":false,"reviewed_by":null,"open_ai":null,"ai":null,"created":"2020-12-21 16:18:00","updated":"2026-03-03 15:06:50"},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t<a href=\"https:\/\/memberpress.com\/pt\" title=\"Home\">Home<\/a>\n<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t<a href=\"https:\/\/memberpress.com\/pt\/blog\/category\/advice\/\" title=\"Advice\">Advice<\/a>\n<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\tHow to Fix the \u201cError Establishing a Database Connection\u201d in WordPress\n<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/memberpress.com\/pt"},{"label":"Advice","link":"https:\/\/memberpress.com\/pt\/blog\/category\/advice\/"},{"label":"How to Fix the \u201cError Establishing a Database Connection\u201d in WordPress","link":"https:\/\/memberpress.com\/pt\/blog\/error-establishing-a-database-connection-in-wordpress-what-it-means-how-to-fix-it\/"}],"app_bookmark":{"bookmark_id":0,"is_bookmarked":false,"bookmark_date":0},"comments_count":"1","content_native":[{"type":"core\/paragraph","render":"<p>In this article we cover the common \u201cerror establish a database connection in WordPress\u201d message that can sometimes be displayed when a website is unavailable.<\/p>","content":[{"type":"text","data":"In this article we cover the common \u201cerror establish a database connection in WordPress\u201d message that can sometimes be displayed when a website is unavailable."}],"data":[],"style":{"textAlign":"left","color":"","dropCap":false,"parent_style":{}}},{"type":"core\/paragraph","render":"<p>First up, we look at some of the causes of this error, before exploring the different ways it can be fixed.<\/p>","content":[{"type":"text","data":"First up, we look at some of the causes of this error, before exploring the different ways it can be fixed."}],"data":[],"style":{"textAlign":"left","color":"","dropCap":false,"parent_style":{}}},{"type":"core\/paragraph","render":"<p>Although this article doesn\u2019t dive too deeply into the technical details behind the causes of this problem and the ways to fix it, this article should give you a good overview of this issue to help you understand it better and speak about it more confidently.<\/p>","content":[{"type":"text","data":"Although this article doesn\u2019t dive too deeply into the technical details behind the causes of this problem and the ways to fix it, this article should give you a good overview of this issue to help you understand it better and speak about it more confidently."}],"data":[],"style":{"textAlign":"left","color":"","dropCap":false,"parent_style":{}}},{"type":"core\/paragraph","render":"<p>So with that in mind, let\u2019s begin\u2026<\/p>","content":[{"type":"text","data":"So with that in mind, let\u2019s begin\u2026"}],"data":[],"style":{"textAlign":"left","color":"","dropCap":false,"parent_style":{}}},{"type":"core\/heading","render":"<h2 class=\"wp-block-heading\" id=\"what-causes-a-wordpress-database-connection-error\">What Causes a WordPress Database Connection Error?<\/h2>","content":"Quais s\u00e3o as causas de um erro de conex\u00e3o com o banco de dados do WordPress?","data":[],"style":{"align":"left","parent_style":{},"header":"h2","fontSize":"27px"}},{"type":"core\/paragraph","render":"<p>Unlike some errors that you might see on a website or on your computer, such as the 404 error or a warning that an illegal operation has been performed, the error that we\u2019re looking at today at least has a self-explanatory name or output message.<\/p>","content":[{"type":"text","data":"Unlike some errors that you might see on a website or on your computer, such as the 404 error or a warning that an illegal operation has been performed, the error that we\u2019re looking at today at least has a self-explanatory name or output message."}],"data":[],"style":{"textAlign":"left","color":"","dropCap":false,"parent_style":{}}},{"type":"core\/paragraph","render":"<p>So when you see the Error Establishing a Database Connection message when trying to access a WordPress website, it really does mean that the WordPress software can\u2019t connect to its underlying database.<\/p>","content":[{"type":"text","data":"So when you see the Error Establishing a Database Connection message when trying to access a WordPress website, it really does mean that the WordPress software can\u2019t connect to its underlying database."}],"data":[],"style":{"textAlign":"left","color":"","dropCap":false,"parent_style":{}}},{"type":"core\/paragraph","render":"<p>As this database is where all of the WordPress website\u2019s content, settings, files, and more are stored, it\u2019s a pretty big problem if the site can\u2019t make the connection. However, even though it is a serious issue, it doesn\u2019t mean that your site is broken beyond repair. As we\u2019ll see in the solution section to this guide to understanding this WordPress database error, it can be fixed.<\/p>","content":[{"type":"text","data":"As this database is where all of the WordPress website\u2019s content, settings, files, and more are stored, it\u2019s a pretty big problem if the site can\u2019t make the connection. However, even though it is a serious issue, it doesn\u2019t mean that your site is broken beyond repair. As we\u2019ll see in the solution section to this guide to understanding this WordPress database error, it can be fixed."}],"data":[],"style":{"textAlign":"left","color":"","dropCap":false,"parent_style":{}}},{"type":"core\/paragraph","render":"<p>Unfortunately, though, the causes for this problem do vary and there\u2019s no one explanation for when your WordPress website can\u2019t connect to its database. Also, as there\u2019s no single cause for this problem, there isn\u2019t a single solution to the WordPress database error either.<\/p>","content":[{"type":"text","data":"Unfortunately, though, the causes for this problem do vary and there\u2019s no one explanation for when your WordPress website can\u2019t connect to its database. Also, as there\u2019s no single cause for this problem, there isn\u2019t a single solution to the WordPress database error either."}],"data":[],"style":{"textAlign":"left","color":"","dropCap":false,"parent_style":{}}},{"type":"core\/paragraph","render":"<p>However, there are some common causes of the WordPress database connection error that we\u2019ll quickly cover here before moving on to sharing some tips on how you can fix this issue.<\/p>","content":[{"type":"text","data":"However, there are some common causes of the WordPress database connection error that we\u2019ll quickly cover here before moving on to sharing some tips on how you can fix this issue."}],"data":[],"style":{"textAlign":"left","color":"","dropCap":false,"parent_style":{}}},{"type":"core\/heading","render":"<h3 class=\"wp-block-heading\" id=\"incorrect-database-details\">Incorrect Database Details<\/h3>","content":"Detalhes incorretos do banco de dados","data":[],"style":{"align":"left","parent_style":{},"header":"h3","fontSize":"21px"}},{"type":"core\/paragraph","render":"<p>One common cause of this error is that the details which WordPress is using to connect to the database are incorrect, including the database name, username, and password.<\/p>","content":[{"type":"text","data":"One common cause of this error is that the details which WordPress is using to connect to the database are incorrect, including the database name, username, and password."}],"data":[],"style":{"textAlign":"left","color":"","dropCap":false,"parent_style":{}}},{"type":"core\/paragraph","render":"<p>If WordPress can\u2019t access the file that contains these details \u2013 the wp-config.php file \u2013 or the contents of that file doesn\u2019t match the credentials of the database, then you\u2019ll see the database connection error.<\/p>","content":[{"type":"text","data":"If WordPress can\u2019t access the file that contains these details \u2013 the wp-config.php file \u2013 or the contents of that file doesn\u2019t match the credentials of the database, then you\u2019ll see the database connection error."}],"data":[],"style":{"textAlign":"left","color":"","dropCap":false,"parent_style":{}}},{"type":"core\/paragraph","render":"<p>Causes that could lead to this problem arising include changes to the database username or password that haven\u2019t been reflected in the wp-config.php file, or the renaming, deletion, or corruption of the wp-config.php file itself.<\/p>","content":[{"type":"text","data":"Causes that could lead to this problem arising include changes to the database username or password that haven\u2019t been reflected in the wp-config.php file, or the renaming, deletion, or corruption of the wp-config.php file itself."}],"data":[],"style":{"textAlign":"left","color":"","dropCap":false,"parent_style":{}}},{"type":"core\/heading","render":"<h3 class=\"wp-block-heading\" id=\"corrupted-database\">Corrupted Database<\/h3>","content":"Banco de dados corrompido","data":[],"style":{"align":"left","parent_style":{},"header":"h3","fontSize":"21px"}},{"type":"core\/paragraph","render":"<p>Another cause of this error could be the fact that the database has been corrupted or damaged in some way. If this happens, then WordPress might not be able to connect to it, producing the error establishing a database connection message to be displayed instead of the website and its content.<\/p>","content":[{"type":"text","data":"Another cause of this error could be the fact that the database has been corrupted or damaged in some way. If this happens, then WordPress might not be able to connect to it, producing the error establishing a database connection message to be displayed instead of the website and its content."}],"data":[],"style":{"textAlign":"left","color":"","dropCap":false,"parent_style":{}}},{"type":"core\/heading","render":"<h3 class=\"wp-block-heading\" id=\"overloaded-database-server\">Overloaded Database Server<\/h3>","content":"Servidor de banco de dados sobrecarregado","data":[],"style":{"align":"left","parent_style":{},"header":"h3","fontSize":"21px"}},{"type":"core\/paragraph","render":"<p>Another cause of this issue can be that the server hosting the database is overloaded. When this happens, the files on the server can become unavailable, causing a connection error.<\/p>","content":[{"type":"text","data":"Another cause of this issue can be that the server hosting the database is overloaded. When this happens, the files on the server can become unavailable, causing a connection error."}],"data":[],"style":{"textAlign":"left","color":"","dropCap":false,"parent_style":{}}},{"type":"core\/paragraph","render":"<p>This cause is especially common if you\u2019re using cheap shared hosting for your WordPress website. With this type of hosting, multiple websites and their databases are stored on the same server, sharing the same resources and increasing the chances of an overload. Due to this, it might not be your website that\u2019s causing the problem, and instead, one of your neighbors on the same server.<\/p>","content":[{"type":"text","data":"This cause is especially common if you\u2019re using cheap shared hosting for your WordPress website. With this type of hosting, multiple websites and their databases are stored on the same server, sharing the same resources and increasing the chances of an overload. Due to this, it might not be your website that\u2019s causing the problem, and instead, one of your neighbors on the same server."}],"data":[],"style":{"textAlign":"left","color":"","dropCap":false,"parent_style":{}}},{"type":"core\/paragraph","render":"<p>The good news is that if this is the cause, there\u2019s a chance the error will resolve itself, once the load on the server has reduced.<\/p>","content":[{"type":"text","data":"The good news is that if this is the cause, there\u2019s a chance the error will resolve itself, once the load on the server has reduced."}],"data":[],"style":{"textAlign":"left","color":"","dropCap":false,"parent_style":{}}},{"type":"core\/heading","render":"<h2 class=\"wp-block-heading\" id=\"how-to-fix-a-wordpress-database-connection-error\">How to Fix a WordPress Database Connection Error<\/h2>","content":"Como corrigir um erro de conex\u00e3o com o banco de dados do WordPress","data":[],"style":{"align":"left","parent_style":{},"header":"h2","fontSize":"27px"}},{"type":"core\/paragraph","render":"<p>While it\u2019s a big deal when a WordPress website is unable to connect to its database \u2013 mainly because the site becomes unavailable -- thankfully, it\u2019s often a problem that can be fixed.<\/p>","content":[{"type":"text","data":"While it\u2019s a big deal when a WordPress website is unable to connect to its database \u2013 mainly because the site becomes unavailable -- thankfully, it\u2019s often a problem that can be fixed."}],"data":[],"style":{"textAlign":"left","color":"","dropCap":false,"parent_style":{}}},{"type":"core\/paragraph","render":"<p>Although in many cases, you can fix this problem yourself, your first port of call should be your web hosting support desk. Most good web hosts have a priority support channel you can use if your website is unavailable, which it will be if the error establishing a database connection message is displayed. But whatever your level of service, get in touch with your web host help desk via the most responsive method, which is usually live chat or telephone.<\/p>","content":[{"type":"text","data":"Although in many cases, you can fix this problem yourself, your first port of call should be your web hosting support desk. Most good web hosts have a priority support channel you can use if your website is unavailable, which it will be if the error establishing a database connection message is displayed. But whatever your level of service, get in touch with your web host help desk via the most responsive method, which is usually live chat or telephone."}],"data":[],"style":{"textAlign":"left","color":"","dropCap":false,"parent_style":{}}},{"type":"core\/paragraph","render":"<p>If you want to try and fix the problem yourself, the tips below should help you to solve this issue.<\/p>","content":[{"type":"text","data":"If you want to try and fix the problem yourself, the tips below should help you to solve this issue."}],"data":[],"style":{"textAlign":"left","color":"","dropCap":false,"parent_style":{}}},{"type":"core\/heading","render":"<h3 class=\"wp-block-heading\" id=\"don-t-forget-to-check-your-backups\">Don\u2019t Forget to Check Your Backups<\/h3>","content":"N\u00e3o se esque\u00e7a de verificar seus backups","data":[],"style":{"align":"left","parent_style":{},"header":"h3","fontSize":"21px"}},{"type":"core\/paragraph","render":"<p>Before you start trying to fix this issue, make sure you have a working backup of your WordPress website and its database. If you\u2019ve been using one of <a href=\"https:\/\/memberpress.com\/best-backup-plugins-for-your-wordpress-membership-site\/\">our recommended WordPress backup solutions<\/a>, then there\u2019s a good chance you\u2019ll already have an archive of your website to fall back on should something go wrong, or if you\u2019re unable to fix the database connection error. Your backup strategy should include testing your backups to ensure you\u2019re able to restore them when they\u2019re needed.<\/p>","content":[{"type":"text","data":"Before you start trying to fix this issue, make sure you have a working backup of your WordPress website and its database. If you\u2019ve been using one of <a href=\"https:\/\/memberpress.com\/best-backup-plugins-for-your-wordpress-membership-site\/\">our recommended WordPress backup solutions<\/a>, then there\u2019s a good chance you\u2019ll already have an archive of your website to fall back on should something go wrong, or if you\u2019re unable to fix the database connection error. Your backup strategy should include testing your backups to ensure you\u2019re able to restore them when they\u2019re needed."}],"data":[],"style":{"textAlign":"left","color":"","dropCap":false,"parent_style":{}}},{"type":"core\/paragraph","render":"<p>If you haven\u2019t been backing up your WordPress website, then you could try contacting your web host to see if they\u2019ve been taking backups of your site on your behalf.<\/p>","content":[{"type":"text","data":"If you haven\u2019t been backing up your WordPress website, then you could try contacting your web host to see if they\u2019ve been taking backups of your site on your behalf."}],"data":[],"style":{"textAlign":"left","color":"","dropCap":false,"parent_style":{}}},{"type":"core\/paragraph","render":"<p>If there aren\u2019t any recent backups of your website, you could still be able to take one. While you won\u2019t be able to log in to the WordPress Dashboard to create a backup when you\u2019re seeing the database connection error message, you could create a backup at the server level, using the tools provided by your web host. These tools can often be found in the cPanel. Again, contact your web host if you\u2019re unsure about how to create a backup outside of WordPress.<\/p>","content":[{"type":"text","data":"If there aren\u2019t any recent backups of your website, you could still be able to take one. While you won\u2019t be able to log in to the WordPress Dashboard to create a backup when you\u2019re seeing the database connection error message, you could create a backup at the server level, using the tools provided by your web host. These tools can often be found in the cPanel. Again, contact your web host if you\u2019re unsure about how to create a backup outside of WordPress."}],"data":[],"style":{"textAlign":"left","color":"","dropCap":false,"parent_style":{}}},{"type":"core\/paragraph","render":"<p>Any backups created after the database connection error has occurred will still contain the error, but at least if you make any mistakes while trying to fix the problem, you\u2019ll be able to roll back to when you created the backup and try again.<\/p>","content":[{"type":"text","data":"Any backups created after the database connection error has occurred will still contain the error, but at least if you make any mistakes while trying to fix the problem, you\u2019ll be able to roll back to when you created the backup and try again."}],"data":[],"style":{"textAlign":"left","color":"","dropCap":false,"parent_style":{}}},{"type":"core\/heading","render":"<h3 class=\"wp-block-heading\" id=\"fixing-the-wordpress-database-connection-error\">Fixing the WordPress Database Connection Error<\/h3>","content":"Como corrigir o erro de conex\u00e3o com o banco de dados do WordPress","data":[],"style":{"align":"left","parent_style":{},"header":"h3","fontSize":"21px"}},{"type":"core\/paragraph","render":"<p>So, now that you have your backup files somewhere safe and accessible, here are some of the ways it might be possible to fix the error establishing a database connection in WordPress issue.<\/p>","content":[{"type":"text","data":"So, now that you have your backup files somewhere safe and accessible, here are some of the ways it might be possible to fix the error establishing a database connection in WordPress issue."}],"data":[],"style":{"textAlign":"left","color":"","dropCap":false,"parent_style":{}}},{"type":"core\/heading","render":"<h3 class=\"wp-block-heading\" id=\"incorrect-database-details\">Incorrect Database Details<\/h3>","content":"Detalhes incorretos do banco de dados","data":[],"style":{"align":"left","parent_style":{},"header":"h3","fontSize":"21px"}},{"type":"core\/paragraph","render":"<p>As mentioned earlier, if the details, such as the database name, username, and password, in the wp-config.php file don\u2019t match the actual details of your database, WordPress won\u2019t be able to connect to the database.<\/p>","content":[{"type":"text","data":"As mentioned earlier, if the details, such as the database name, username, and password, in the wp-config.php file don\u2019t match the actual details of your database, WordPress won\u2019t be able to connect to the database."}],"data":[],"style":{"textAlign":"left","color":"","dropCap":false,"parent_style":{}}},{"type":"core\/paragraph","render":"<p>So to check if this mismatch is the cause of the error, you\u2019ll need to locate and open your wp-config.php file and check those details yourself. The wp-config.php file can be found in the root directory of your website on the server where it\u2019s hosted. To access that area, you\u2019ll need to log in to the server via FTP or use an online file manager to access the file.<\/p>","content":[{"type":"text","data":"So to check if this mismatch is the cause of the error, you\u2019ll need to locate and open your wp-config.php file and check those details yourself. The wp-config.php file can be found in the root directory of your website on the server where it\u2019s hosted. To access that area, you\u2019ll need to log in to the server via FTP or use an online file manager to access the file."}],"data":[],"style":{"textAlign":"left","color":"","dropCap":false,"parent_style":{}}},{"type":"core\/image","render":"<figure class=\"wp-block-image\"><img src=\"https:\/\/memberpress.com\/wp-content\/uploads\/2019\/06\/Database-Error-File-Manager.png\" alt=\"File Manager\" class=\"wp-image-18310\"\/><\/figure>","content":"https:\/\/memberpress.com\/wp-content\/uploads\/2019\/06\/Database-Error-File-Manager.png","data":{"alt":"File Manager","src":"https:\/\/memberpress.com\/wp-content\/uploads\/2019\/06\/Database-Error-File-Manager.png"},"style":{"width":1600,"height":892,"align":"left","parent_style":{}}},{"type":"core\/paragraph","render":"<p>If you\u2019re not sure how to do this, you\u2019ll need to find the documentation provided by your host, or contact their support staff.<\/p>","content":[{"type":"text","data":"If you\u2019re not sure how to do this, you\u2019ll need to find the documentation provided by your host, or contact their support staff."}],"data":[],"style":{"textAlign":"left","color":"","dropCap":false,"parent_style":{}}},{"type":"core\/image","render":"<figure class=\"wp-block-image\"><img src=\"https:\/\/memberpress.com\/wp-content\/uploads\/2019\/06\/Database-Error-FTP.png\" alt=\"FTP Server\" class=\"wp-image-18311\"\/><\/figure>","content":"https:\/\/memberpress.com\/wp-content\/uploads\/2019\/06\/Database-Error-FTP.png","data":{"alt":"FTP Server","src":"https:\/\/memberpress.com\/wp-content\/uploads\/2019\/06\/Database-Error-FTP.png"},"style":{"width":1400,"height":832,"align":"left","parent_style":{}}},{"type":"core\/paragraph","render":"<p>Once you\u2019ve found the file, be sure to create a backup of it before making any changes. Once that\u2019s done, open the file for editing, by either downloading it from the server or through the file manager interface.<\/p>","content":[{"type":"text","data":"Once you\u2019ve found the file, be sure to create a backup of it before making any changes. Once that\u2019s done, open the file for editing, by either downloading it from the server or through the file manager interface."}],"data":[],"style":{"textAlign":"left","color":"","dropCap":false,"parent_style":{}}},{"type":"core\/paragraph","render":"<p>As the image below shows, the lines you\u2019re looking for start with \/\/ ** MySQL settings - You can get this info from your web host ** \/\/<\/p>","content":[{"type":"text","data":"As the image below shows, the lines you\u2019re looking for start with \/\/ ** MySQL settings - You can get this info from your web host ** \/\/"}],"data":[],"style":{"textAlign":"left","color":"","dropCap":false,"parent_style":{}}},{"type":"core\/image","render":"<figure class=\"wp-block-image\"><img src=\"https:\/\/memberpress.com\/wp-content\/uploads\/2019\/06\/Database-Error-Editing.png\" alt=\"MySQL WP-Config.php entry\" class=\"wp-image-18312\"\/><\/figure>","content":"https:\/\/memberpress.com\/wp-content\/uploads\/2019\/06\/Database-Error-Editing.png","data":{"alt":"MySQL WP-Config.php entry","src":"https:\/\/memberpress.com\/wp-content\/uploads\/2019\/06\/Database-Error-Editing.png"},"style":{"width":1260,"height":442,"align":"left","parent_style":{}}},{"type":"core\/paragraph","render":"<p>In that section of the wp-config.php file, you can see the following details:<\/p>","content":[{"type":"text","data":"In that section of the wp-config.php file, you can see the following details:"}],"data":[],"style":{"textAlign":"left","color":"","dropCap":false,"parent_style":{}}},{"type":"core\/list","render":"<ul class=\"wp-block-list\"><li>The name of the database: DB_NAME<\/li><li>The database username: DB_USER<\/li><li>The database password: DB_PASSWORD<\/li><li>The database hostname: DB_HOST<\/li><\/ul>","content":"<ul class=\"wp-block-list\"><li>O nome do banco de dados: DB_NAME<\/li><li>O nome de usu\u00e1rio do banco de dados: DB_USER<\/li><li>A senha do banco de dados: DB_PASSWORD<\/li><li>O nome do host do banco de dados: DB_HOST<\/li><\/ul>","data":{"listType":"unordered"},"style":{"parent_style":{}}},{"type":"core\/paragraph","render":"<p>Now you\u2019ll need to check that those details match the details for the database. To do so, you\u2019ll need to access the database. Your options here will be defined by your web host. But one popular way to access the database is through your web hosting control panel, such as via the phpMyAdmin tool found in the cPanel interface.<\/p>","content":[{"type":"text","data":"Now you\u2019ll need to check that those details match the details for the database. To do so, you\u2019ll need to access the database. Your options here will be defined by your web host. But one popular way to access the database is through your web hosting control panel, such as via the phpMyAdmin tool found in the cPanel interface."}],"data":[],"style":{"textAlign":"left","color":"","dropCap":false,"parent_style":{}}},{"type":"core\/image","render":"<figure class=\"wp-block-image\"><img src=\"https:\/\/memberpress.com\/wp-content\/uploads\/2019\/06\/Database-Error-cPanel-Database-Tools.png\" alt=\"cPanel Database tools\" class=\"wp-image-18313\"\/><\/figure>","content":"https:\/\/memberpress.com\/wp-content\/uploads\/2019\/06\/Database-Error-cPanel-Database-Tools.png","data":{"alt":"cPanel Database tools","src":"https:\/\/memberpress.com\/wp-content\/uploads\/2019\/06\/Database-Error-cPanel-Database-Tools.png"},"style":{"width":1550,"height":313,"align":"left","parent_style":{}}},{"type":"core\/paragraph","render":"<p>Once you\u2019ve launched phpMyAdmin to access the database, you need to confirm the details from the wp-config.php file that we just covered. This is perhaps the most difficult part of the process so it\u2019s best to refer to <a href=\"https:\/\/kinsta.com\/blog\/error-establishing-a-database-connection\/\">this guide on the Kinsta blog<\/a> that covers how to check the credentials of your WordPress database to see if they match the details in your wp-config.php file.<\/p>","content":[{"type":"text","data":"Once you\u2019ve launched phpMyAdmin to access the database, you need to confirm the details from the wp-config.php file that we just covered. This is perhaps the most difficult part of the process so it\u2019s best to refer to <a href=\"https:\/\/kinsta.com\/blog\/error-establishing-a-database-connection\/\">this guide on the Kinsta blog<\/a> that covers how to check the credentials of your WordPress database to see if they match the details in your wp-config.php file."}],"data":[],"style":{"textAlign":"left","color":"","dropCap":false,"parent_style":{}}},{"type":"core\/paragraph","render":"<p>If at this point you\u2019d rather seek support from your web host than proceed on your own, you can send the help desk staff the database details from your wp-config.php file to help them get started.<\/p>","content":[{"type":"text","data":"If at this point you\u2019d rather seek support from your web host than proceed on your own, you can send the help desk staff the database details from your wp-config.php file to help them get started."}],"data":[],"style":{"textAlign":"left","color":"","dropCap":false,"parent_style":{}}},{"type":"core\/heading","render":"<h3 class=\"wp-block-heading\" id=\"overloaded-database-server\">Overloaded Database Server<\/h3>","content":"Servidor de banco de dados sobrecarregado","data":[],"style":{"align":"left","parent_style":{},"header":"h3","fontSize":"21px"}},{"type":"core\/paragraph","render":"<p>If the cause of your database connection error is an overloaded server, then there\u2019s a good chance the problem will resolve itself once the burden on the server has decreased.<\/p>","content":[{"type":"text","data":"If the cause of your database connection error is an overloaded server, then there\u2019s a good chance the problem will resolve itself once the burden on the server has decreased."}],"data":[],"style":{"textAlign":"left","color":"","dropCap":false,"parent_style":{}}},{"type":"core\/paragraph","render":"<p>Unfortunately, there\u2019s no quick and easy way to determine if this is the cause of the error. While your Google Analytics data could reveal that your website is experiencing a surge in traffic, it could be one of the other websites hosted on the same server that is causing the overload.<\/p>","content":[{"type":"text","data":"Unfortunately, there\u2019s no quick and easy way to determine if this is the cause of the error. While your Google Analytics data could reveal that your website is experiencing a surge in traffic, it could be one of the other websites hosted on the same server that is causing the overload."}],"data":[],"style":{"textAlign":"left","color":"","dropCap":false,"parent_style":{}}},{"type":"core\/paragraph","render":"<p>If you contact the support staff of your web host, they should be able to tell you if this is the cause of your issue.<\/p>","content":[{"type":"text","data":"If you contact the support staff of your web host, they should be able to tell you if this is the cause of your issue."}],"data":[],"style":{"textAlign":"left","color":"","dropCap":false,"parent_style":{}}},{"type":"core\/paragraph","render":"<p>If an overloaded server is causing downtime for your website, then it might be time to consider changing your hosting plan. One option would be upgrading to a higher plan with your current provider, or <a href=\"https:\/\/memberpress.com\/how-to-choose-the-best-web-hosting-for-your-membership-site\/\">switching to a better web host<\/a>.<\/p>","content":[{"type":"text","data":"If an overloaded server is causing downtime for your website, then it might be time to consider changing your hosting plan. One option would be upgrading to a higher plan with your current provider, or <a href=\"https:\/\/memberpress.com\/how-to-choose-the-best-web-hosting-for-your-membership-site\/\">switching to a better web host<\/a>."}],"data":[],"style":{"textAlign":"left","color":"","dropCap":false,"parent_style":{}}},{"type":"core\/heading","render":"<h2 class=\"wp-block-heading\" id=\"final-thoughts\">Final Thoughts<\/h2>","content":"Considera\u00e7\u00f5es finais","data":[],"style":{"align":"left","parent_style":{},"header":"h2","fontSize":"27px"}},{"type":"core\/paragraph","render":"<p>Hopefully, this article has shed some light on the infamous error establishing a database connection problem that can affect WordPress websites from time to time.<\/p>","content":[{"type":"text","data":"Hopefully, this article has shed some light on the infamous error establishing a database connection problem that can affect WordPress websites from time to time."}],"data":[],"style":{"textAlign":"left","color":"","dropCap":false,"parent_style":{}}},{"type":"core\/paragraph","render":"<p>In most cases, your best option will be to contact your web host and instruct them to resolve the issue. However, the information in this article should have given you a better idea of what\u2019s caused the problem and some of the ways it can be fixed.&nbsp;<\/p>","content":[{"type":"text","data":"In most cases, your best option will be to contact your web host and instruct them to resolve the issue. However, the information in this article should have given you a better idea of what\u2019s caused the problem and some of the ways it can be fixed.&nbsp;"}],"data":[],"style":{"textAlign":"left","color":"","dropCap":false,"parent_style":{}}},{"type":"core\/paragraph","render":"<p>Fixing your website yourself can be rewarding. But in most cases, its best left to the professionals.<\/p>","content":[{"type":"text","data":"Fixing your website yourself can be rewarding. But in most cases, its best left to the professionals."}],"data":[],"style":{"textAlign":"left","color":"","dropCap":false,"parent_style":{}}},{"type":"core\/paragraph","render":"<p><em>Has your website ever displayed the error establishing a database connection message? If so, what did you do to resolve it? Please let us know in the comments below. <\/em><\/p>","content":[{"type":"text","data":"<em>Has your website ever displayed the error establishing a database connection message? If so, what did you do to resolve it? Please let us know in the comments below. <\/em>"}],"data":[],"style":{"textAlign":"left","color":"","dropCap":false,"parent_style":{}}}],"app_access":{"can_access":true,"restrict_message":null},"_links":{"self":[{"href":"https:\/\/memberpress.com\/pt\/wp-json\/wp\/v2\/posts\/18307","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/memberpress.com\/pt\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/memberpress.com\/pt\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/memberpress.com\/pt\/wp-json\/wp\/v2\/users\/2122"}],"replies":[{"embeddable":true,"href":"https:\/\/memberpress.com\/pt\/wp-json\/wp\/v2\/comments?post=18307"}],"version-history":[{"count":0,"href":"https:\/\/memberpress.com\/pt\/wp-json\/wp\/v2\/posts\/18307\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/memberpress.com\/pt\/wp-json\/wp\/v2\/media\/33261"}],"wp:attachment":[{"href":"https:\/\/memberpress.com\/pt\/wp-json\/wp\/v2\/media?parent=18307"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/memberpress.com\/pt\/wp-json\/wp\/v2\/categories?post=18307"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/memberpress.com\/pt\/wp-json\/wp\/v2\/tags?post=18307"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}