Support

Akeeba Backup for Joomla!

#13738 AEAbstractDump :: Database Error: Could not connect to MySQL

Posted in ‘Akeeba Backup for Joomla! 4 & 5’
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

Joomla! version
n/a
PHP version
n/a
Akeeba Backup version
n/a

Latest post by nicholas on Tuesday, 09 October 2012 04:39 CDT

user69123
Mandatory information about my setup:

Have I read the related troubleshooter articles above before posting (which pages?)? Yes
Have I searched the tickets before posting? Yes
Have I read the documentation before posting (which pages?)? Yes, Native and Alt CRON docs
Joomla! version: 2.5.7
PHP version: 5.3.13
MySQL version: 5.5.27
Host: ICDSoft (www.icdsoft.com)
Akeeba Backup version: 3.6.5 Professional

EXTREMELY IMPORTANT: Please attach a ZIP file containing your Akeeba Backup log file in order for us to help you with any backup or restoration issue. If the file is over 2Mb, please upload it on your server and post a link to it.

Description of my issue:

I am getting this error when running the NATIVE CRON:

AEAbstractDump :: Database Error: Could not connect to MySQL


The script starts to run, but stops there. I looked through the posts and tried--

1) setting max execution time to 7 (my host is at 120)
2) using JPA format and setting"Part size for split archives" to 2.00
3) checking for extra database definitions under "Multiple Databases Definitions", and there are none there.

I have also tried using the ALT CRON, but got these errors:

ERROR:

	This script could not detect your live site's URL. Please visit Akeeba

	Backup's Control Panel page at least once before running this script, so

	that this information can be stored for use by this script.

ERROR:

	Your Akeeba Backup installation's front-end backup feature is currently

	disabled. Please log in to your site's back-end as a Super Administra-

	tor, go to Akeeba Backup's Control Panel, click on the Parameters icon

	in the top right corner and enable the front-end backup feature. Do not

	forget to also set a Secret Word!


BACKUP ABORTED DUE TO CONFIGURATION ERRORS


I have used the backup control panel already and the front-end backup feature *is* enabled, so I'm not sure what that doesn't work.

Any assistance would be greatly appreciated. Thanks!! Hope you enjoy the Joomla Day conference!

nicholas
Akeeba Staff
Manager
Regarding the first error (the MySQL connection one), I believe it is related to a bug which I have already fixed very recently. Please download and install the latest dev release. Despite it being labelled as alpha it is very stable and will actually be released as 3.6.6 stable this week. If the problem persists with this version, please ZIP and attach your new log file.

Regarding the akeeba-altbackup.php scripts, you have to do as the second message reads:
Please log in to your site's back-end as a Super Administrator, go to Akeeba Backup's Control Panel, click on the Parameters icon in the top right corner and enable the front-end backup feature. Do not forget to also set a Secret Word!

(yes, the icon actually reads Options, not Parameters, that's a typo) Afterwards just reload the Akeeba Backup control panel page and you will be able to use this script.

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!

user69123
Hey, thanks for the reply!

I'm getting the same error(s) with the dev release. The logs are attached.

Also for the ALT script, the front-end feature *is* enabled and I do have a secret word setup, but I am still getting that error.

Also I found the CLI log file in the default Akeeba backup directory, instead of the directory that I setup in the config (not sure if that makes a difference).

Thanks again.

nicholas
Akeeba Staff
Manager
I see what's going on, but I can't help you. The PHP CLI setup used by your hosting provider doesn't allow connecting to the database server using the mysqli driver. Unfortunately this means that the CRON scripts (akeeba-backup.php and akeeba-altbackup.php) cannot work on your server. You will have to use the front-end backup feature with wget, curl or webcron.org as explained in our documentation.

Also I found the CLI log file in the default Akeeba backup directory, instead of the directory that I setup in the config (not sure if that makes a difference).

No, this is wrong. The scripts are located in the cli directory at the root of your Joomla! site. They are NOT stored in the output directory and they are NOT stored in Akeeba Backup's directory. If you are using the ancient scripts (backup.php and altbackup.php) inside administrator/components/com_akeeba STOP USING THEM. They have been removed since Akeeba Backup 3.5.0. If they are there, they are leftovers from an older installation and will NOT work.

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!

user69123
Ok, I can ask host about this.

I am using the scripts in the cli directory (I just purchased AKP so I don't have any older scripts). I was just saying that the log file that was created was created in the Akeeba default directory for some reason even though I have a different directory specifie in the config.

If I can't get this host to change their cli config, do you have any recommendations for hosts that work with this software?

Thanks!

nicholas
Akeeba Staff
Manager
The logs are always created in the backup output directory specified in the backup profile's configuration. If you have multiple profiles please check that the profile you are trying to use does reference the new output directory.

Regarding hists, I can certainly recommend a few hosts which I know are working with our software and are of a good quality such as Rochen, SiteGround, CloudAccess.net and iRedHost.

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!

user69123
The akeeba cli log is created in the default directory, along with the .jpa files that failed in the cron. I just assumed that was due to the cron failure, as running a backup manually works perfectly.

Thanks for the recommendations!

user69123
OK, I have more information for you!

My host does have mysql connections through cli enabled. The problem was actually happening because I had moved my configuration.php file outside of the web root. I was using the defines.php override method, outlined here:

http://docs.joomla.org/Moving_sensitive_files_outside_the_web_root

Once I moved my configuration.php file back into the root directory and canceled the override, the cron proceeded without an error and created my backup file.

Have you heard of this before and if so, is there a way I can use Akeeba Backup while still having the config file outside of the root? I would like to do that for security.

nicholas
Akeeba Staff
Manager
The log was in the wrong directory because there was no MySQL connection. This caused the config to not be read. Makes sense.

Regarding moving your configuration.php outside the site's root, it is a pointless thing and a bad idea. Rad my latest blog post about it at http://www.dionysopoulos.me

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!

user69123
Ha! That blog post just pwned my life!

Ok, man. All is good then. Thanks a lot for helping during your vacation.

nicholas
Akeeba Staff
Manager
You're welcome!

Yup, my blog posts do have that effect. At least they are quite informative, too :D

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!