FOG 1.5.7 Update Database Issue
-
For all other users on Ubuntu out there. Please if you intend to update, use the current developer release 1.5.7.2 instead of plain 1.5.7 or wait till the next release is out. I just pushed out a fix that should address this current issue.
-
These are my results below:
mariadb.service - MariaDB 10.1.40 database server Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled) Active: active (running) since Mon 2019-08-05 16:50:56 AEST; 9min ago Docs: man:mysqld(8) https://mariadb.com/kb/en/library/systemd/ Main PID: 22323 (mysqld) Status: "Taking your SQL requests now..." Tasks: 34 (limit: 4419) CGroup: /system.slice/mariadb.service └─22323 /usr/sbin/mysqld
drwxr-xr-x 4 mysql mysql 4096 Aug 5 16:50 mysql drwx------ 6 mysql mysql 4096 Aug 5 15:25 mysql-5.7 drwx------ 2 mysql mysql 4096 Oct 28 2018 mysql-files drwx------ 2 mysql mysql 4096 Mar 7 2017 mysql-keyring
updated from 1.5.6 to 1.5.7, get the same issue as everyone is describing
changed to dev branch 1.5.7.2 re-installed to see if it would fix it. still the sameI am able to get into MariaDB with mysql -u root -p
Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 28366 Server version: 10.1.40-MariaDB-0ubuntu0.18.04.1 Ubuntu 18.04 Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> Ctrl-C -- exit! Aborted
I have backup’s here, but not quite sure how to restore them so the installation works
/home/fogDBbackups
-
Update, just refreshed the page and loaded into this
clicked Install/update now and can now see the dashboard, looks very empty. I will look more into this tomorrow
-
@Arrowtron Sorry to hear you have run into this as well. Unfortunately upgrading to 1.5.7.2 doesn’t help when you have gone to 1.5.7 already. We don’t do this as an automatic fix in the scripts as I find it too error prone to do in a scripted kind of way.
You should still have your “old” and valid database in
/var/lib/mysql-5.7
. Please follow the steps outlined below and I hope you should be right back up again:sudo -i mv /var/lib/mysql /var/lib/mysql-mariadb apt-get remove mariadb-client mariadb-server cp -a /var/lib/mysql-5.7 /var/lib/mysql apt-get install mysql-client mysql-server systemctl start mysql
-
@Sebastian-Roth said in FOG 1.5.7 Update Database Issue:
/var/lib/mysql
Thanks for the reply,
I get this when i run the command
apt-get install mysql-client mysql-serverThere is a MySQL server running, but we failed in our attempts to stop it.
Stop it yourself and try again!Tried a few commands found doing a web search that didn’t help
apt --fix-broken installFailed to stop mysql.service: Unit mysql.service not loaded. invoke-rc.d: initscript mysql, action "stop" failed. invoke-rc.d returned 5 There is a MySQL server running, but we failed in our attempts to stop it. Stop it yourself and try again! dpkg: error processing archive /var/cache/apt/archives/mysql-server-5.7_5.7.27-0ubuntu0.18.04.1_amd64.deb (--unpack): new mysql-server-5.7 package pre-installation script subprocess returned error exit status 1 Errors were encountered while processing: /var/cache/apt/archives/mysql-server-5.7_5.7.27-0ubuntu0.18.04.1_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1)
install mysql-client mysql-server Reading package lists... Done Building dependency tree Reading state information... Done mysql-client is already the newest version (5.7.27-0ubuntu0.18.04.1). mysql-server is already the newest version (5.7.27-0ubuntu0.18.04.1). You might want to run 'apt --fix-broken install' to correct these. The following packages have unmet dependencies: mysql-server : Depends: mysql-server-5.7 but it is not going to be installed E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
=Update=
accidentally ran command sudo rm -rvf /var/lib
(thought i was typing in a new line, working too quick, was backing up mysql and purging etc) Going to start a fresh i think -
@Arrowtron said in FOG 1.5.7 Update Database Issue:
There is a MySQL server running, but we failed in our attempts to stop it.
Stop it yourself and try again!Did you run
apt-get remove mariadb-client mariadb-server
before that? Kind of strange but you might have to kill the old DB process like thiskillall -9 mysqld
…=Update=
accidentally ran command sudo rm -rvf /var/libI am sure you have a backup of that machine! Do you? Just recover that directory from your backup and proceed.
Run
apt --fix-broken install
as suggested in the output and post what you get from this. -
Yes i ran
apt-get remove mariadb-client mariadb-server
Didn’t try this command, it might have helped for the unmet dependencies problem
killall -9 mysqld
Yes i have some SQL backup’s from previous upgrade which I have restored onto a new server (just had to change IP’s etc which is fine)
It’s on a virtual machine where as physical before, snapshots will come in handy for next time!Yes ran the apt --fix broken install and got the unmet dependencies for mysql errors. Didn’t have the time to keep looking into it
All goods, thanks for your help though!
-
@Arrowtron I am sure you know about there being various places in files and the DB where you have to change the IP address: https://wiki.fogproject.org/wiki/index.php/Change_FOG_Server_IP_Address
-
Yes found this Wiki when I was migrating, thank you