Support

Site Restoration

#37434 Error in establishing a database connection

Posted in ‘Site restoration’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

PHP version
7.4.30
CMS Type
WordPress
CMS Version
6.0
Backup Tool Version
7.6.9
Kickstart version
7.1.0

Latest post by tampe125 on Monday, 11 July 2022 08:26 CDT

ottosuperstudio

Hello, 

I'm trying to restore my website (https://pre.ottosuperstudio.com/sb) on a new domain (loradicervello.it) however every time I start the database restoration this error appears (first attached file) where it says: "Access denied for user 'qi4yop9b_SB'@'localhost' to database 'qi4yop9b_sb_db' SQL=CREATE DATABASE `qi4yop9b_SB_db` CHARACTER SET `utf8`"

In the second attached file there is my sites information.

Hope you can tell me what it is wrong.

Thank you and wish you a nice day.

EA

System Task
system
The ticket information has been edited by Enrico Armanni (ottosuperstudio).

tampe125
Akeeba Staff

Salve,

l'errore riportato riguarda una mancanza di permessi nell'effettuare un'operazione sul database. Più nel dettaglio, lo script di restore cerca di creare il database se non esiste.

Controllando il messaggio di errore, vedo che prima il nome del database è qi4yop9b_sb_db, dopo qi4yop9b_SB_db (si noti il cambio del maiuscolo). Potrebbe controllare che il nome del database abbia le maiuscole al posto giusto?

Davide Tampellini

Developer and Support Staff

🇮🇹Italian: native 🇬🇧English: good • 🕐 My time zone is Europe / Rome (UTC +1)
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

ottosuperstudio

Buongiorno,

grazie Davide per avermi risposto, ho provato a modificare e correggere il nome del database, e quando ho iniziato il ripristino è andato tutto a buon fine, sono riuscito a ripristinare il sito sul dominio loradicervello.it.

Però oltre alla homepage le altre pagine del sito danno questo errore (file in allegato). Non so quale sia il problema, ho provato a fare di nuovo il ripristino del sito e anche questa volta le pagine mi davano questo errore.

Riesco fare l'accesso al backend di wordpress per poter modificare e/o aggiungere pagine.

Attendo tuo gentile riscontro.

Grazie,

EA

tampe125
Akeeba Staff

Salve,

probabilmente alcune impostazione del sito vecchio non sono compatibili con il sito nuovo, le lascio alcune istruzioni per il debug

A white page or a page with a 500 Internal Server Error is, in fact, either a .htaccess issue to a PHP fatal error in disguise.

First, let's see if it is a .htaccess issue. Try renaming the .htaccess file in your site's root to htaccess.bak This disables WordPress' permalinks. To re-enable them go to your site's wp-admin, Settings, Permalinks and note down which of the "Common Settings" option is selected. Now select a different Common Settings option and click on Save Changes at the bottom of the change. Now change it back to your previous option and click on Save Changes again. This little dance with WordPress options instructs WordPress to regenerate its default .htaccess which does not conflict with anything and is used to enable permalinks.

If that solved the problem, the issue was with a directive in your .htaccess file. We'd like to recommend you to try removing directives from your .htaccess until you find the one which causes the problem.

If that doesn't help, the error you are receiving is in fact a PHP error in disguise. First, check your server's error logs (not the access logs) immediately after visiting the page which throws the error. There should be an exact description of the PHP fatal error which occurred. Sometimes you can find the error messages in files called error_log or error.log inside the site's root, the wp-admin directory or wherever the .php file which produces the blank page is located. If unsure about the error log location, please consult your host. Most likely the error logs are available in your site's hosting control panel.

If your host does not give you access to the error logs you will need to edit your site's wp-config.php file to enable WP_DEBUG. Find the line reading

define( 'WP_DEBUG', false );

and change it to

define( 'WP_DEBUG', true );

If no such line exists on your site's wp-config.php file please append that line at the end of the file. Do remember to reverse this change after you're done debugging!

If you still get a white page, please create a file called php.ini with the following content:

display_errors=on
error_reporting=E_ALL

and upload it into your site's root and your site's administrator directory. If the file already exists edit the existing file instead of replacing it. Retry loading the problem page.

If that fails again create a file named .user.ini (note that it's dot user dot ini, the leading dot is important) with the contents:

display_errors=on
error_reporting=E_ALL

and upload it into your site's root and your site's administrator directory. If the file already exists edit the existing file instead of replacing it. Wait for 10 minutes. Waiting is important, .user.ini files do not apply immediately. Retry loading the problem page.

If you still get a white page, remove the php.ini or .user.ini file your created (or the changes you made to these files) and consult your host. They have to provide you the PHP error message, file and line it occurs (along with the error's backtrace) themselves.

Please note that if you can not understand what the PHP error message means, just copy and paste it here verbatim so that we can take a look and point you to the right direction.

Davide Tampellini

Developer and Support Staff

🇮🇹Italian: native 🇬🇧English: good • 🕐 My time zone is Europe / Rome (UTC +1)
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

ottosuperstudio

Salve,

ho provato a rinominate .htaccess e il debugging suggerito ha funzionato.

Ora vorrei capire se devo fare altro o sono a posto così, perché nel testo che mi hai mandato c'era questa frase

"If that solved the problem, the issue was with a directive in your .htaccess file. We'd like to recommend you to try removing directives from your .htaccess until you find the one which causes the problem."

Se c'è altro che devo fare potresti dirmi come farlo, che non saprei quali directives cancellare e che cosa sono in sè.

 

Grazie della disponibilità e del supporto dimostratomi.

EA

tampe125
Akeeba Staff

Salve,

ho reso questo ticket privato, è possibile avere accesso al sito web in questione? Così posso vedere qual è la causa del problema.

I have made this ticket private so that only you and me can see the information posted here.

Please provide me with the following information:

  1. The URL to your site's administrator login page
  2. Administrator username and password (Network Administrator for WordPress Multisite installations)
  3. FTP connection information


Please allow up to one business day (GMT+2 timezone) for me to log in to your site and debug this issue. When I'm done I will post back. Once the issue is fixed, you can revoke my access e.g. by changing the Super Administrator and FTP passwords.

IMPORTANT INFORMATION
In order for me to help you fast and accurately, please provide the information by copying the form below, paste it into your reply and fill in the information:

----- Access Information Form -- START -----
WordPress Administrator access

  • URL to site's administrator page (e.g. http://www.example.com/wp-admin?foobar):
  • Administrator username:
  • Administrator password:


FTP connection information

  • FTP methods supported (e.g. FTP, FTPS, SFTP):
  • FTP Hostname:
  • FTP Username:
  • FTP Password:
  • FTP Port (if other than 21 for FTP and 22 for SFTP, ask your host):


----- Access Information Form -- END -----

Please make sure that you have tested the Administrator connection using a different browser or machine than the one you are using daily. Double check that logging in is possible and that the user has Administrator privileges or, if it's a WordPress multisite installation, Network Administrator privileges. Make sure that your site does not block whole countries or IP ranges which would make it impossible for me to log in / connect by FTP. Finally, please do make sure that the FTP connection works and that logging in to it I have access to your site's files.

Kindly note that your site connection information and your site content is handled in strict confidence. Not only we are a reputable development company, we are also bound by law (EU GDPR) to do so. After you file your reply, the connection information to your site will be stored in an encrypted, hidden storage area on our site and will be automatically deleted when this ticket is closed. Finally keep in mind that the people providing support to you are the same developers who wrote the software you're using on your site.

Davide Tampellini

Developer and Support Staff

🇮🇹Italian: native 🇬🇧English: good • 🕐 My time zone is Europe / Rome (UTC +1)
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

ottosuperstudio

Hello,

the following are the credentials that you asked for:

WordPress Administrator access

  • URL to site's administrator page (e.g. http://www.example.com/wp-admin?foobar): https://loradicervello.it/wp-admin
  • Administrator username: akeeba-support
  • Administrator password: R*tSIpxAyH38#IK41a4xd9h1


FTP connection information

  • FTP methods supported (e.g. FTP, FTPS, SFTP): FTP
  • FTP Hostname: ftp.loradicervello.it
  • FTP Username[email protected]
  • FTP Password: VUU2*zo.9UjP
  • FTP Port (if other than 21 for FTP and 22 for SFTP, ask your host): 21

If you need anything else, just let me know.

Thank you for the support.

Best regards,

EA

tampe125
Akeeba Staff

Salve,

ho provato a collegarmi tramite FTP al sito web, però ho un error di autenticazione. Potrebbe controllare se le credenziali sono corrette?

Davide Tampellini

Developer and Support Staff

🇮🇹Italian: native 🇬🇧English: good • 🕐 My time zone is Europe / Rome (UTC +1)
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

ottosuperstudio

Ho modificato la password, questa quella nuova: mQX!wtcHE6c!

tampe125
Akeeba Staff

Perfetto grazie mille.

Mi sono appena collegato e mi sembra che tutto funzioni correttamente, qual è il file .htaccess che dava problemi? Controllando il contenuto, sia il file .htaccess che htaccess.bak sono praticamente uguali

Davide Tampellini

Developer and Support Staff

🇮🇹Italian: native 🇬🇧English: good • 🕐 My time zone is Europe / Rome (UTC +1)
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

ottosuperstudio

Grazie a te, il file che dava problemi era quello che adesso è nominato htaccess.bak

tampe125
Akeeba Staff

Ok perfetto. Controllando il file, le varie direttive erano impostate come se il sito fosse nella cartella "sb". Dal momento che invece è nella root del filesystem, deve essere cambiato.

Giusto per curiosità, alla fine del restore ANGIE ha effettua lo step del Data Replacement? Di solito è in quello step che si occupa di "aggiustare" i vari link e path.

Davide Tampellini

Developer and Support Staff

🇮🇹Italian: native 🇬🇧English: good • 🕐 My time zone is Europe / Rome (UTC +1)
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

ottosuperstudio

Grazie mille, penso di si ma non mi ricordo di preciso.

tampe125
Akeeba Staff

Ok, ad ogni modo siamo riusciti ad identificare e risolvere il problema. Al prossimo restore ci faccia caso e mi faccia sapere, così vediamo un attimo di controllare se è tutto ok.

Davide Tampellini

Developer and Support Staff

🇮🇹Italian: native 🇬🇧English: good • 🕐 My time zone is Europe / Rome (UTC +1)
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!