Support

Akeeba Backup for Joomla!

#12773 Backup using CRON runs into 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 Monday, 25 June 2012 13:16 CDT

zahnd
Mandatory information about my setup:

Have I read the related troubleshooter articles above before posting (which pages?)? Automating Backup
Have I searched the tickets before posting? Yes
Have I read the documentation before posting (which pages?)? Yes
Joomla! version: 2.5.4
PHP version: 5.3.10
MySQL version: 5.1.58
Host: www.issdichfit.ch
Akeeba Backup version: 3.5.2 Pro

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:

Hi,

Tried to set up a CRON job to backup my site to DropBox. I've configured the connection to DropBox (can transfer existing Backup) and manual Backup works. When I start the script with the command "/usr/bin/php /home/thestae/www/issdichfit.ch/cli/akeeba-backup.php --profile=1" Some PHP_WARNINGS appear and the backup fails with "Could not connect to MySQL". Log is attached.

Thank you for your help!

Best regards

Stefan

nicholas
Akeeba Staff
Manager
This actually means that the Joomla! Platform could not establish a database connection. To the best of my knowledge this can only happen if you've transferred your configuration.php file outside of the site's root in a way that's incompatible with the platform, i.e. without updating defines.php. If this is what you've done, you're using Akeeba Backup in an unsupported site configuration and I can't help :(

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!

zahnd
Ok, thank you, that's help enough :). I've moved the configurationfile into the root and prevented public access with the .htaccess. This was my concern about having the config in the root...

nicholas
Akeeba Staff
Manager
configuration.php is always protected. Nobody can access it directly, even if it's in the site's root. Besides, you can always use Admin Tools Professional's .htaccess Maker which blocks access like crazy to pretty much everything ;)

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!

zahnd
I thought of using the Admin Tools but there's one open question: In Joomla! config I have the mod_rewrite enabled which uses also a .htaccess. I think I can't have enabled this and create an .htaccess with Admin Tools... Or does the .htaccess from Admin Tools also include the rules for the mod_rewrite option from Joomla!? What's the best practice here?

Thank you for a short info about this!

nicholas
Akeeba Staff
Manager
Of course it already includes those rules :)

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!