Koozali.org: home of the SME Server

Error establishing a database connection

Offline ramilvinas

  • 4
  • +0/-0
Error establishing a database connection
« on: April 02, 2022, 11:15:07 AM »
Hi,
im trying to transfer and upgrade my SME server from 9.1 to 10.
Im using a Virtual Box and install SME Server 10.
then from old server i manage to backup the 9.1 and restored it to v.10 using console.
After the restoration and trying to access my https://domain/server-manager and error occurred and saving "Error establishing a database connection".

What did i missed? please help - just new with this environment.
Thank you.

Offline Jean-Philippe Pialasse

  • *
  • 2,762
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: Error establishing a database connection
« Reply #1 on: April 02, 2022, 01:31:16 PM »
what have you actually tried to do?

without more details all I can assume is that you got to the login page and in place of login box you got this error, which as this login page does not rely on any db does not fit your error. So please elaborate what you were doing and on what page exactly. 

Also have you actually signal-event post-upgrade ; signal-event reboot after you restored ? without that a lot of services will not be configured or would not be started. 

Finally any template customs in your restored sme? if yes start removing all of them do another signal-event post-upgrade ; signal-event reboot and try again. 

Offline ramilvinas

  • 4
  • +0/-0
Re: Error establishing a database connection
« Reply #2 on: April 02, 2022, 02:14:13 PM »
Hi,
Here's what I did...
1. From old SME Server 9.1 i execute the backup thru console using USB flash drive.
2. I setup a Virtual Box to install the SME Server 10 and during installation it ask if i need to restore backup from USB and I choose YES.
3. The restoration went successful but then i notice when i tried to access the server manager, the web server which was setup from the old SME9.1 comes with an error which i notice that MySQL database is not included in the restored backup.

Note: the old server is setup as web server which was directly link to our domain address.
Can you guide me step by step what to do to restore as is all the system setup from 9.1 to 10.

Thank you

Offline ramilvinas

  • 4
  • +0/-0
Re: Error establishing a database connection
« Reply #3 on: April 02, 2022, 03:03:24 PM »
I only need to restore the web server to sme 10.
Is there a procedure where i can follow? Like saving the web server file and MySql database...
Hoping for your favorable response. Thank you

Offline Jean-Philippe Pialasse

  • *
  • 2,762
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: Error establishing a database connection
« Reply #4 on: April 02, 2022, 06:03:41 PM »
mysql db are included in the restore.

they are restored after the signal-event post-update ; signal-event reboot. 

unless you did not used the core mysql.

Offline ramilvinas

  • 4
  • +0/-0
Re: Error establishing a database connection
« Reply #5 on: April 03, 2022, 02:35:54 AM »
You mean before the backup process, i should execute signal-event post-update ; signal-event reboot? Or before the restore process?

Online TerryF

  • grumpy old man
  • *
  • 1,826
  • +6/-0
Re: Error establishing a database connection
« Reply #6 on: April 03, 2022, 11:43:38 AM »
You mean before the backup process, i should execute signal-event post-update ; signal-event reboot? Or before the restore process?

After the restore
--
qui scribit bis legit

Offline Jean-Philippe Pialasse

  • *
  • 2,762
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: Error establishing a database connection
« Reply #7 on: April 03, 2022, 02:33:29 PM »
You mean before the backup process, i should execute signal-event post-update ; signal-event reboot? Or before the restore process?
backup process from console  triggers a
Code: [Select]
signal-event pre-backupwhich dump mysql db in /home/e-smith/db/mysql/[dbnames].dump

which is then backup and restored using the console restore

at the end of the restore you need to  to
signal-event post-upgrade ; signal-event reboot
so the *.dump files are copied to /etc/e-smith/sql/init/*.sql
and latter incorporated into the new mysql db during the boot process.