Support

Site Restoration

#39255 Could not connect to database in restore, solved for now

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
CMS Type
Joomla!
CMS Version
3.10.12
Backup Tool Version
8.3.1 Pro
Kickstart version
7.1.2

Latest post by nicholas on Wednesday, 26 July 2023 02:26 CDT

dfirsching

Yesterday, I tried many times to do a restoration to a temporary location to do a Joomla! upgrade.

The restoration script would just not connect to the database, no matter how carefully I checked the user and database names and passwords.

Last night at a JUG meeting it was suggested that I try two things:

(1) Switch from Kickstart 8.0.1 back to 7.1.2

(2) Create a second database user and try that one.

Lo and behold, it worked.

So this is just letting you know, for what it's worth, that with the first user and Kickstart 8.0.1 it did not work, despite many tries, and others had also experienced this and solved it as described above. Not sure what the issue is.

System Task
system
The ticket information has been edited by Dorothy Firsching (dfirsching).

nicholas
Akeeba Staff
Manager

For the umpteenth time:

KICKSTART DOES NOT RESTORE YOUR DATABASE. IT ONLY EXTRACTS THE BACKUP ARCHIVE.

When you run Kickstart, this is literally the first bullet point it shows you. To be precise, that reads:

Kickstart is not an installer. It is an archive extraction tool. The actual installer was put inside the archive file at backup time.

This is also documented:

  1. Kickstart is not an installer. It is an archive extraction tool. The actual installer was put inside the archive file at backup time.
  2. Kickstart is bound by your server's configuration. As such, it may not work at all.
  3. You should download and upload your archive files using FTP in Binary transfer mode. Any other method could lead to a corrupt backup archive and restoration failure.
  4. Post-restoration site load errors are usually caused by .htaccess or php.ini directives. You should understand that blank pages, 404 and 500 errors can usually be worked around by editing the aforementioned files. It is not our job to mess with your configuration files, because this could be dangerous for your site.
  5. Kickstart overwrites files without a warning. If you are not sure that you are OK with that do not continue.
  6. Trying to restore to the temporary URL of a cPanel host (e.g. http://1.2.3.4/~username) will lead to restoration failure and your site will appear to be not working. This is normal and it's just how your server and CMS software work.
  7. You are supposed to read the documentation before using this software. Most issues can be avoided, or easily worked around, by understanding how this software works.
  8. This text does not imply that there is a problem detected. It is standard text displayed every time you launch Kickstart.
https://www.akeeba.com/documentation/akeeba-kickstart-documentation/kickstart-interface.html#initial-dialogue

Please stop trying to convince me —the person who wrote the software— that Kickstart does something it has never done, does not do, and never will do. All you have to do is RTFM (Read The Fabulous Manual):

Make sure you have a database. Even though Akeeba Backup's restoration script can try to create a database for you this WILL NOT work on most database servers for security reasons. Creating a database requires database server administrator (root) privileges which you typically do not have and, even if you do, should not use when restoring a site to a live server. Instead, create a database for your site in advance. You will also need to create a database user and give it the correct privileges as described in our troubleshooter.

https://www.akeeba.com/documentation/akeeba-backup-joomla/restoring-backups.html#general-guidelines

and of course https://www.akeeba.com/documentation/troubleshooter/abidatabase.html which is too long to quote inline and has set by step instructions. Check them out.

Your problem was that you had not given permissions to your original database user to the database you had created.

Or, you needed to switch between the two database drivers (MySQLi and PDO MySQL) because they are not the same, they work very differently, and one of them might be broken on your host.

These are a very common, self-inflicted issues which has nothing to do with our software. They have to do with how MySQL / MariaDB itself and PHP itself work.

You'd have exactly the same problem if you tried installing Joomla!, WordPress, Drupal, Magneto, PrestaShop, or even phpMyAdmin from scratch. No Kickstart there. Same problem.

So, do you still think it is a problem with Akeeba Kickstart which has absolutely nothing to do with your database connection whatsoever?

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
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!