Support ⇒ Troubleshootings ⇒ Migrating Dragonfly (The connection to the database...) ⇒ Community Forums ⇒ CPG Dragonfly™ CMS
Forum IndexTroubleshootings

Migrating Dragonfly (The connection to the database...) Reply to topic


Hello,
I'm migrating Dragonfly from one server to another, I've checked all the credentials and they are correct however I am getting:

The connection to the database server failed, sorry for the inconvenience

We should be back shortly


The version of Dragonfly is 9.14 so quite old I guess. The version of mysql is 5.1.66. Is it ok to run an older version of Dragonfly on a newer version of mysql?

Any advise would be really appreciated.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Home


did you copy the config.php from the old site by mistake

Dragonfly 9.4 Running on PHP 7.x + MariaDB

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
PHP Version 7.0.6 + MariaDB + Dragonfly 9.4 Modified


Well, I copied it, but I altered the database credentials. They match perfectly. I've checked them two or three times.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Home


Hi Skezza,

What is the OS of the server ? Have you checked if there is any Firewall blocking the mysql port ?
What hostname do you have in your config.php ?
Did you tried to connect to you database with another client or even with a telnet to see if the DB is responding as expected ?
Did you tried to make a fresh install ?

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux/Apache/MySQL 5.1.49/PHP 5.3.6/ DF 9.3.2.0


What is the OS of the server ? Have you checked if there is any Firewall blocking the mysql port ?
It's a Linux server. I couldn't tell you which exactly I'd need to look in the spec on cpanel (will do tonight). MySQL port is open and connects ok from other php systems.

What hostname do you have in your config.php ?
I have the hostname that corresponds to the site name, basically, instead of doing localhost, they use the 'mysql.sitename'. Regardless I've checked it and it's definitely correct.

Did you tried to connect to you database with another client or even with a telnet to see if the DB is responding as expected ?
Yep. I've run a conversion tool to see if I could get the Dragonfly db to convert to another CMS system, just in case last roll of the dice and I don't get it working. Suffice to say it worked fine and the database converted successfully. I'm hoping I don't have to resort to this though Sad

Did you tried to make a fresh install ?
Tried everything I could, but for some reason everytime I load the install.php I get a load of garbage text on the screen. Doesn't seem to even load the script, just displays random ascii characters. Sad

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Home


ok, the garbage you see is for my experience related to the PHP version used if i remember it correctly. A long time ago i encountered this situation.

As far as i remember i had to explicitly run on PHP 5.3 or greater to avoid this situation. With my hoster i d tag the php version in the .htaccess file at the site root.
What version of dragonfly did you tried to make a fresh installation with ?

On your production site did you tried to enable debuging mode in order to see more details about what fails ? You can do this in the config.php file by changing the CPG_DEBUG constant to true. If SQL debug is not enabled for this site you must do it manualy in the databse. In the table ???_custom_config locate the 3 rows that have
cfg_name=debug

set the following cfg_values for the respective "cfg_field"s
cfg_field=error_level cfg_value=1546
cfg_field=database cfg_value=1
cfg_field=session cfg_value=1

Atfer that you should be able to see debuging infromation. Report any suspicious messages

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux/Apache/MySQL 5.1.49/PHP 5.3.6/ DF 9.3.2.0


i just looked a bit closer, Probably enabling debugging will not give you more information since it seems the database connexion fail will throw it's error before debuging stuff is activated.

Sorry but i have no idea what else can be done. Perhaps deleting the content of the cache folder, leave only the .htaccess file in place. Probably this will also bring no changes to your situation.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux/Apache/MySQL 5.1.49/PHP 5.3.6/ DF 9.3.2.0


Are you using MySQLi or MySQL for the connection ?
If not using MySQLi it could be a password problem.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Fedora 25 / Apache 2.4.27 / MariaDB 10.1.26 / PHP 7.1.10 / Mercurial

All times are UTC


Jump to: