Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
Coppa WPB
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

Come risolvere l’errore di stabilire una connessione al database in WordPress

Viene visualizzato l’avviso “Errore nello stabilire una connessione al database” in WordPress?

Si tratta di un errore fatale che rende il sito inaccessibile agli utenti. Si verifica quando WordPress non è in grado di stabilire una connessione al database. Poiché diversi fattori possono influire su questa connessione, l’errore può essere un po’ difficile da risolvere per i principianti.

In questo articolo vi mostreremo come risolvere facilmente l'”Errore nello stabilire una connessione al database” sul vostro sito WordPress, passo dopo passo.

Fix the Error Establishing a Database Connection in WordPress

Cosa causa l’errore di stabilire una connessione al database in WordPress?

Un database è un software che facilita l’archiviazione, l’organizzazione e il recupero di dati da altri software.

Come sistema di gestione dei contenuti, WordPress utilizza un database per memorizzare tutti i contenuti e gli altri dati del sito web. Si connette quindi al database ogni volta che qualcuno visita il vostro sito web.

WordPress ha bisogno delle seguenti informazioni per connettersi al database:

  • Il nome del database
  • Nome utente e password del database
  • Server di database

Queste informazioni sono memorizzate nel file di configurazione di WordPress, chiamato wp-config.php.

Se una di queste informazioni non è corretta, WordPress non riuscirà a connettersi al server del database e verrà visualizzato l’errore “Errore nello stabilire una connessione al database”.

Database connection error in WordPress

È uno degli errori più comuni di WordPress. Oltre alle credenziali errate, questo errore può comparire anche se il server del database è inattivo o i file del database sono corrotti.

Detto questo, vediamo come risolvere il problema “Errore nello stabilire la connessione al database” in WordPress con una risoluzione dei problemi passo dopo passo.

1. Controllare le credenziali del database di WordPress

Il motivo più comune per cui si verifica un errore di connessione al database è la presenza di credenziali errate. Se avete recentemente spostato il vostro sito WordPress su un nuovo host, è probabile che il problema sia questo.

Le credenziali del database di WordPress sono memorizzate nel file wp-config.php. È il file di configurazione di WordPress che contiene importanti impostazioni, tra cui le informazioni sul database.

Se non avete mai modificato un file wp-config.php, date un’occhiata alla nostra guida per principianti su come modificare il file wp-config.php per maggiori istruzioni.

Si cercheranno le seguenti righe nel file wp-config.php:

// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define( 'DB_NAME', 'database_name_here' );
/** MySQL database username */
define( 'DB_USER', 'username_here' );
/** MySQL database password */
define( 'DB_PASSWORD', 'password_here' );
/** MySQL hostname */
define( 'DB_HOST', 'localhost' );

In questo caso, è necessario assicurarsi che le informazioni relative al nome del database, al nome utente, alla password e all’host del database siano corrette.

Potete confermare queste informazioni dalla dashboard del vostro account di hosting WordPress. Per questo tutorial utilizzeremo Bluehost, ma la procedura sarà simile anche per altri pannelli di hosting.

Una volta effettuato l’accesso, fare clic sulla scheda “Sito web” nella colonna di sinistra e poi passare alla scheda “Avanzate”. Quindi, scorrere fino alla sezione “Database” e fare clic sul pulsante “Gestisci” accanto ad essa.

Click the Manage button next to the Database section

In questo modo si aprirà la pagina dei database MySQL in cPanel in una nuova finestra.

Qui, nella sezione “Database corrente”, si trovano il nome del database e il nome utente. Ricordate di copiare e incollare questi dati in un blocco note per poterli aggiungere al file wp-config.

Find your database name and username in the Current Databases section

Quindi, scorrere fino alla sezione “Utenti attuali”, dove è possibile fare clic sul link “Cambia password” accanto al nome del database.

Si accede così a una nuova schermata, in cui è possibile modificare la password del database secondo le proprie esigenze.

Change your database password

Una volta confermati tutti i dettagli del database, è possibile modificare le informazioni nel file wp-config.php, se necessario.

Quindi, provare a visitare nuovamente il sito web per verificare se l’errore di connessione al database è scomparso.

Se l’errore è ancora presente, significa che c’è qualcos’altro che non va.

2. Controllare le informazioni sull’host del database

Se si è certi che il nome del database, il nome utente e la password siano corretti, occorre assicurarsi di utilizzare le informazioni corrette sull’host del database.

La maggior parte delle società di hosting WordPress utilizza localhost come host del database. Tuttavia, alcune società di hosting WordPress gestite utilizzano server separati per ospitare i database. In questo caso, le informazioni sull’host del database non saranno localhost.

Ciò significa che dovrete contattare la vostra società di hosting WordPress per confermare questi dettagli.

3. Riparazione del database di WordPress

Ora potreste ricevere un errore diverso nella dashboard di wp-admin, come “Una o più tabelle del database non sono disponibili” o “Potrebbe essere necessario riparare il database”. In questo caso, è necessario riparare il database.

È possibile farlo aggiungendo la seguente riga nel file wp-config.php. Assicuratevi di aggiungerla subito prima della riga “Questo è tutto, smettete di modificare! Buon blog”:

define('WP_ALLOW_REPAIR', true);

Una volta fatto ciò, è possibile vedere le impostazioni visitando questa pagina: http://www.yoursite.com/wp-admin/maint/repair.php. Assicuratevi di sostituire yoursite.com con il vostro nome di dominio.

A questo punto, è necessario fare clic sul pulsante “Ripara database” per avviare il processo.

Repair WordPress database

Nota: non è necessario che l’utente sia connesso per accedere alla pagina di riparazione del database. Una volta terminata la riparazione e l’ottimizzazione del database, assicurarsi di rimuovere questa riga di codice dal file wp-config.php.

Tuttavia, se non volete aggiungere alcun codice al vostro sito, potete anche riparare il database dal pannello di controllo del vostro account di hosting.

Visitate il vostro account di hosting e aprite la pagina “Siti web” dalla colonna di sinistra. Quindi, passate alla scheda “Avanzate” e fate clic sul pulsante “Gestisci” nella sezione Database.

Click the Manage button next to the Database section

Si aprirà cPanel in una nuova scheda. Qui, scorrere fino alla sezione “Modifica database” e scegliere il nome del database dal menu a discesa “Ripara database”.

Una volta fatto ciò, è sufficiente fare clic sul pulsante “Ripara database” per avviare il processo.

Click the Repair database button

Il pannello di hosting riparerà automaticamente il database.

Una volta completato il processo, verrà visualizzato un messaggio di successo.

Database repair success message

Ora potete visitare il vostro sito WordPress per vedere se l’errore è stato risolto o meno.

4. Controllare se il server di database è inattivo

Se tutto sembra essere corretto e WordPress non riesce ancora a connettersi al database, è possibile che il server del database(server MySQL) sia inattivo.

Questo potrebbe accadere a causa del traffico intenso su un server. Il vostro server host non è in grado di gestire il carico (soprattutto se avete un hosting condiviso).

Per questo motivo, il vostro sito diventerà lento e potrebbe anche dare errore ad alcuni utenti. In questo caso, dovreste telefonare o chattare con il vostro provider di hosting e chiedere se il vostro server MySQL è reattivo.

Inoltre, se sullo stesso server sono in esecuzione altri siti web, è possibile selezionare questi siti per verificare che il server SQL sia giù.

Se non avete altri siti sullo stesso account di hosting, andate semplicemente nel vostro cruscotto di hosting e passate alla scheda “Avanzate”.

Successivamente, fare clic sul pulsante “Gestisci” accanto alla sezione phpMyAdmin.

Click the Manage button next to the PHPMyAdmin option

Si aprirà phpMyAdmin in una nuova finestra, dove si dovrà fare clic sull’opzione “Database” in alto.

Quindi, fare clic sul nome del database per accedere alle sue impostazioni. Se ci riuscite, è il momento di verificare se l’utente del database ha i permessi sufficienti.

Connect PHPMyAdmin with your database

Per farlo, occorre creare un nuovo file chiamato testconnection.php e incollarvi il seguente codice:

<?php
$link = mysqli_connect('localhost', 'username', 'password');
if (!$link) {
die('Could not connect: ' . mysqli_error());
}
echo 'Connected successfully';
mysqli_close($link);
?>

Dopo aver incollato il codice, assicuratevi di sostituire il nome utente e la password con i vostri. Ora è possibile caricare questo file sul proprio sito web e accedervi tramite un browser.

Se lo script si è collegato correttamente, significa che l’utente dispone di permessi sufficienti e che l’errore è causato da qualcos’altro.

Ora è necessario tornare al file wp-config e analizzarlo per assicurarsi che tutti i dettagli siano accurati e senza errori di battitura.

Altre soluzioni che hanno funzionato per gli utenti

Se i suggerimenti per la risoluzione dei problemi di cui sopra non riescono a risolvere l’errore di connessione al database sul vostro sito web, potete provare questi ulteriori passaggi.

Come riportato dai nostri utenti, questi passaggi hanno aiutato alcuni di loro a risolvere l’errore di connessione al database sui loro siti web.

1. Aggiornare l’URL del sito WordPress

Potete provare ad aggiornare l’URL del sito WordPress utilizzando phpMyAdmin in cPanel.

È sufficiente accedere a phpMyAdmin dalla dashboard dell’account di hosting e selezionare il database di WordPress dall’elenco.

Quindi passate al menu SQL in alto e inserite la seguente query MySQL:

UPDATE wp_options SET option_value='YOUR_SITE_URL' WHERE option_name='siteurl'

L’aspetto dovrebbe essere il seguente:

Change site URL

Non dimenticate di fornire l’URL del vostro sito e di cambiare wp_options con il nome della vostra tabella, poiché potreste aver cambiato il prefisso della tabella di WordPress.

2. Riavvio del server Web

Gli utenti di server dedicati, server locali e server privati virtuali (VPS) possono provare a riavviare i loro server.

In questo modo si riavvia il server web e il database, che potrebbe risolvere alcuni problemi temporanei che causano l’errore.

3. Chiedere aiuto

Se tutto il resto non funziona, potrebbe essere necessario contattare la società di web hosting. Tutte le buone società di hosting WordPress vi aiuteranno a risolvere il problema, vi indicheranno la direzione giusta o addirittura lo risolveranno per voi.

Potete anche assumere sviluppatori WordPress utilizzando una piattaforma come WPBeginner Pro Services per aiutarvi a correggere questo problema a prezzi ragionevoli. Abbiamo un team dedicato di sviluppatori esperti di cui potete fidarvi per correggere qualsiasi problema di WordPress.

WPBeginner Pro Services

Inoltre, è possibile utilizzare il servizio per la manutenzione del sito, la riparazione di siti violati, l’ottimizzazione della velocità, la ricostruzione del sito web e l’ottimizzazione SEO.

Speriamo che questo articolo vi abbia aiutato a risolvere il problema “Errore nello stabilire una connessione al database” in WordPress. Potreste anche voler consultare la nostra guida alla risoluzione dei problemi di WordPress per avere suggerimenti su come risolvere i problemi di WordPress da soli, oppure la nostra selezione di esperti dei migliori strumenti per freelance e sviluppatori di WordPress.

Se questo articolo vi è piaciuto, iscrivetevi al nostro canale YouTube per le esercitazioni video su WordPress. Potete trovarci anche su Twitter e Facebook.

Divulgazione: I nostri contenuti sono sostenuti dai lettori. Ciò significa che se cliccate su alcuni dei nostri link, potremmo guadagnare una commissione. Vedi come WPBeginner è finanziato , perché è importante e come puoi sostenerci. Ecco il nostro processo editoriale .

Avatar

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

Il kit di strumenti WordPress definitivo

Ottenete l'accesso gratuito al nostro kit di strumenti - una raccolta di prodotti e risorse relative a WordPress che ogni professionista dovrebbe avere!

Reader Interactions

663 commentiLascia una risposta

  1. Syed Balkhi

    Hey WPBeginner readers,
    Did you know you can win exciting prizes by commenting on WPBeginner?
    Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
    You can get more details about the contest from here.
    Start sharing your thoughts below to stand a chance to win!

  2. Barry

    Under CentOS 7, I saw: Could not connect: Can’t connect to MySQL server on ‘xyz’ (13)

    The problem was due to SE Linux, as documented at

    The problem was corrected using the command:

    sudo setsebool -P httpd_can_network_connect_db=1

  3. Alberto

    After installing and setting up Mamp and a fresh WordPress on a friends machine, had the dreaded blank page and “error establishing a connection” in the logs as well.

    After pulling my hair for a while, I noticed that the quotation marks in the wp-config.php file had been changed from straight ones ‘ to curvy ones ’ in the few settings one has to edit, and this was causing the errors, the culprit?

    -> TextEdit <- I had used it to make those changes. In it's preferences, the "clever quote marks" setting should be turned off if you want to have those quotation marks remain as they should be.

    • ka

      Thanks Alberto. Textedit has automatically overwritten the straight quotation marks with curly ones. replacing them with straight ones and saving the php file again did the trick. :)

  4. Bastien

    This error can also be triggered because of a DOS XMLRPC attack :

  5. Tejas Waghmode

    HI

    I’m confuse, how to solve the problem?

  6. Zoe

    Hello, I’m new to wordpress and need some more help.
    My wp-admin page shows the “One or more database tables are unavailable. The database may need to be repaired” message…. so I know I need to add that bit of code. But how and where do I add it? I can’t login… I do not know what address to type in to access this php file. Help please :)
    My website is

  7. Pavanswin

    I am a wp beginner, you guys are awesome, helped me building my careers through this kind of articles. I migrated my website to and struggled with the error for many days and finally found a solution in the article and is very helpful. thank you all

  8. Julio Sanchez

    The original name of the file wp-config is wp-config-sample, I just wrote the original name and vuala no “Error establishing a database connection” message.

    • WPBeginner Support

      wp-config-sample.php file is a sample file not the actual configuration file. The actual configuration file is wp-config.php.

      Admin

  9. Sruly

    I have WordPress with Digital Ocean. I just restarted my server and that fixed the issue.

  10. Nicholas

    If all fails, also try a swap file:

  11. Brendan

    “replacing localhost with the IP”

    This worked! Thank you so much for saving my ass

  12. Guy Pribyl

    Is there a way to have wordpress when posting this error message do a redirect to a non-wordpress page? I JUST WANT A BACK UP FOR WHEN THIS HAPPENS IN THE MIDDLE OF THE NIGHT.

    Thanks for your help

  13. Avioconsys

    Thanks Syed Balkhi and his team. It took me 5 minutes to solve the issue with this error. It was a bad update of the password for the general user.

    Fast and working. Very nice of you sharing this information.

    M.

  14. Suhel

    i am getting the different error but its something some like this,
    wpsa_options: Table ‘aamtechn_wp949.wpsa_options’ doesn’t exist
    wpsa_postmeta: Table ‘aamtechn_wp949.wpsa_postmeta’ doesn’t exist

    i am getting this message and i am not able to access the dashboard.please help me soon.

  15. Camaal Mustafa Sikander

    Thank you so much, this one fixed the Database error for me in the first step itself.

    Best wishes,
    Camaal

  16. Dudley Rees

    Thank you for your help. The username and password part of wp-config.php fixed it for me.

  17. Robert Varga

    I had this problem, and I spent 2 much hours on fixing it … Finally I solve that mistery. My problem was in htacces file, it only had Rewrite Engine line , I just c/p this “default” htaccess content in it and replace it with file on server, and tadaam it work now :D

    “default” htaccess content :

    # BEGIN WordPress

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]

    # END WordPres

  18. Daniel M

    how do i solve depreciation errors for db connection using either PDO or MYSQLi? please help

  19. prince vashisht

    I changed the username (wp_users) from phpmyadmin and now I am getting the same issue.Reverting the changes is also not helping me out.Please help.

  20. Wayne

    When I first experienced this error I was so devastated and I wonder how will I resolve this issue. I did some research and noticed that my database name was the problem. So I went into MYSQL and change the database name. This article explains it all

  21. Kevin Wells

    For whatever reason, I ended up having to recreate my MySQL user in the database. After I did that, my website functioned normally again.

    • Maja

      Change of user also helped me after hours of debbuging

  22. Christine F

    Thanks so much for this!

    I encountered the same issue earlier. I changed the database password and then this error appeared. We have GoDaddy so what I did was just go to the File Manager, open the WP-Config.php and changed the (‘DB_PASSWORD’, ‘database-password’); to the one I recently used. Real simple but wouldn’t have done it without this article.

    Thanks again!

    • Matthew

      Thank you for this reply, Christine. I, too, changed the password and found that to fix the issue as well. Perhaps MySQL had reset it without notifying me.

    • Dutch

      Thanks for this tip! Don’t know how you figured this out from the article. Was about to reload everything..and tried this just in case and it worked. Also on Godaddy, used Installatron to start the installation and uploaded the rest manually.

  23. Alexander

    In my case I solved the problem just updating the password of the DB.
    It seems the password was to weak.

    ciao
    Alexander

  24. sonu arora

    hey i m facing a weird issue with my website, i.e. when i try to check in pingdom then the screenshot generated there shows me data connection error, while when i am opening my website in normal tab or iphone, it gets open. could you please suggest me what to do? i am worried whether my website is showing to public or not. url is thanks in advance!

    • WPBeginner Support

      Try changing server locations in Pingdom test settings. Also try other tools like Google Page Speed tool.

      Admin

  25. Angel

    You say to put this in your wp-config.php file….. define(‘WP_ALLOW_REPAIR’, true);
    you don’t say a single word as to where to put it. I dropped it in right at the top and got a HUGE WP error message. You had it on line 1 without anything to indicate context of where to put it. So most would assume it would go on line 1 at the top. If it doesn’t go there, why not give helpful and specific instructions?

    • WPBeginner Support

      You need to add this just before this line:

      /* That's all, stop editing! Happy blogging. */

      Thanks for bringing this to our attention. We have updated the article.

      Admin

  26. Nica

    when i try this:

    I get an error:
    Could not connect: Lost connection to MySQL server at ‘reading initial communication packet’, system error: 95 “Operation not supported”

    When i test this to php:

    It shows:
    This site can’t be reached

    The connection was reset.
    ERR_CONNECTION_RESET

  27. samchief

    Problem resolved. DB_host was the problem on ipage, it’s quite different from others

  28. RINKU MEHAR

    how could i solve this errors:

    Warning: require_once(C:\xampp\xampp\htdocs\wordpress\wp-admin\admin.php): failed to open stream: No such file or directory in C:\xampp\xampp\htdocs\wordpress\wp-admin\index.php on line 10

    Fatal error: require_once(): Failed opening required ‘C:\xampp\xampp\htdocs\wordpress\wp-admin\admin.php’ (include_path=’.;C:\xampp\xampp\php\PEAR’) in C:\xampp\xampp\htdocs\wordpress\wp-admin\index.php on line 10

  29. FranciscoMary Aghogho

    Please I need an assistance here. I tried changing my site’s url from http to https and now cannot view my site. It say a coonection could not be established. Please what could I do in this instance. Thanks.

    • sourcebreak

      Issue
      If you update from php 5.2 to 5.4 or 5.5 then you will get this error database connection error in wp.

      Cause
      If your password is Pre mysql 4.0 then you will get this error

      Fix
      Login to phpmyadmin >> user >> change password
      type your mysql password >> select >> MySQL 4.1+ compatible and go

  30. Kanif

    I was also facing this issue. I googled it and come to this post. It is really awesome, deep thinking on what all problems may come with this error.
    Mine problem is resolved by doing database repair and optimization.

    Thanks buddy,
    Kanif

  31. ScienceMan

    Thanks for the great post. My situation was interesting, I migrated my server to another account with the same provider. The result was the dreaded “Error Establishing a Database Connection”. Thanks to this article, I knew to have a look at the wp-config.php file.

    When I logged into my new server cPanel and checked the MySQL databases, I immediately spotted the problem. Due to the server migration, the name of the database and user had changed. The databases names at my provider all default to “accountname_databasename”. Also, the database username defaults to “accountname_username”. I suspect other servers are similar.

    Since my server account name changed with the server migration, so did the name of all my databases and database usernames.

    So to fix it, all I did was change these two lines in the wp-config,php file:

    /** The name of the database for WordPress */
    define(‘DB_NAME’, ‘XXXXXX_databasename’);

    /** MySQL database username */
    define(‘DB_USER’, ‘XXXXXX_username’);

    Basically, you want to check carefully to make sure the “XXXXXX” in the wp-config.php file matches what’s at your server.

    Thanks again!

  32. igwe simon

    I mistakenly changed my site and wordpress url to one of my domain so i had to go and change the dns and park it on the website, so i waited for some hours but the domain was still propagating then i read a tutorial (codex.wordpress.org/Changing_The_Site_URL) and followed an option there by editing my functions.php and the next thing i saw was “One or more database tables are unavailable. The database may need to be repaired.”, so i followed the instructions here and still the problem is still active. I need an assistance please.

  33. hafsa munir

    I have following error in my xammp server,how can i resolve it
    he following error was encountered while trying to retrieve the URL: localhost/phpmyadmin/

    Unable to determine IP address from host name .localhost

    The DNS server returned:

    Name Error: The domain name does not exist.
    This means that the system was not able to resolve the hostname presented in the URL. Check if the address is correct.

  34. val girich

    I am seeking free videos on how to use W.P. once it is set up ready to edit, ad docs and so on.

  35. S

    hai
    i done everything as you mentioned in the post but when i opened wp-admin/ then again this error was coming “One or more database tables are unavailable. The database may need to be repaired.”
    So plz help me what to do

  36. Manny

    Thanks!

    I just logged in through FileZilla and checked out the wp-config.php file and double checked everything and realized that I updated my database password but it still showed the previous default password on wp-config.php. So after changing it in the file and saving the changes I was able to access my site again. Your help allowed me to solve my problem, thank you!

  37. Jeremy Smith

    One very important that’s been left out in this post is the “turn it off and turn it back on again” approach.

    If you haven’t actually changed the wp-config file I don’t think you should be going in and fiddling around with it, at least not in the first instance.

    What you should do first is attempt to restart the mysql server.

    To do this (In Terminal)
    1. SSH into your website (you will need your key ‘.pem’ file)*
    2. To restart your mysql type “sudo service mysqld restart”

    This has worked every-time for me.

    *On a Mac
    1. Get your ‘.pem’ file. I got mine from Amazon Web services (hosting the site)
    2. Enable SSH on your Mac – Google it
    3. Open Terminal
    4. Change directory to where you have stored your ‘.pem’ file. -It’s probably easiest to save this on your desktop, then you can just type ‘cd Desktop’ and it should take you there.
    5. Type ‘chmod 400 yourpemfilename.pem (allows you to use this key to get in)
    6. Type ‘ssh -i “yourpemfile.pem” remote_username@remote_host – type the speech marks here
    7. Once logged in (You may have to type y a few times to get you in) type
    sudo service mysqld restart

    • Jcirni

      Restarting works but why does this error keep happening? Happens once a week.

  38. Malkesh

    Hi, my wordpress site gets this error very often,
    we are using AWS, so i need to run this command to restart mysql :

    sudo restart mysqld restart

    the same issue i have also on digital ocean too..

    so i am sure not this is not an server issue, it’s should be some thing in wordpress, that’s put down mysql server..

    Thanks

    • dino

      Same problem here. At least two times per day my site , which is in digital ocean , loose sql connection.
      I have try to optimize my database, bvut nothing works. Any idea?

  39. Glenn

    Thanks,

    When WordPress dies it is scary for a WordPress newbie. I found your solution easy to understand, implement and worked a treat.

  40. Faiza

    Hi,

    This blog was very helpful but I still haven’t been able to figure out this problem. My WP-Config.php file shows me this localhost:

    I am using GoDaddy, I have tried replacing this with local host, my IP address, and (godaddy). Nothing has worked :( Can I get some help here?

  41. Claire

    would the problem be that my domains dns settings haven’t updated yet?

  42. Anupam

    Updating the WP-Config file works for me. Thanks a lot.

  43. Brandon

    WOW!!!! Came across this site because my wife’s business site went down and I was able to fix it in minutes! Thank you!

  44. Cidina

    Thank you soooo much. This post saved my 6-month large project in WordPress. Trying to switch directories I lost connection to the database. I’m not a .php programmer but the topic is so well explained here that it took me five minutes to fix it after finding this blog. Your are awesome!!!

  45. Nino F

    If you changed your password in phpmyadmin, you have to change it in your wp-config.php aswell, if you don’t do that the website doesn’t work. You have to link the two with eachother.

  46. Eddie O'Hagan

    I was getting this error I think because of the theme I had, I changed the theme and I haven’t gotten the error since, I noticed this because when I ran the repair, the comments tables were the ones that had the errors.

    • dino

      how often did you have this problem?
      I have the same , and i loose connection at least twice per day.
      I tried many things but nothin works. If it is the theme i will try it..

  47. samuel nmeje

    this was indeed helpful. thanks a lot.

  48. Ram

    if you use xampp for wordpress offline then the error is removed by following process:
    open in Xampp folder “\xampp\phpMyAdmin\config.inc.php” and then check username and password
    set the same password to wp-config then the error is not appear

  49. Micah

    This is very helpful. Thank you very much!

Lascia una risposta

Grazie per aver scelto di lasciare un commento. Tenga presente che tutti i commenti sono moderati in base alle nostre politica dei commenti e il suo indirizzo e-mail NON sarà pubblicato. Si prega di NON utilizzare parole chiave nel campo del nome. Avremo una conversazione personale e significativa.