Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Won't Fix
    • Affects Version/s: 10.0.15
    • Fix Version/s: N/A
    • Component/s: Platform Debian
    • Labels:
      None
    • Environment:
      Ubuntu Server 14.04

      Description

      Hello!

      I'm not sure whether this is a bug or simply an error occuring in my system only.

      I want to migrate to MariaDB 10.0 and follow the best practice guide from MariaDB.
      In detail I executed the following steps:

      • Start Ubuntu in recovery mode
      • Stop service mysql
      • Start installation of mariadb-server

      The installation will automatically remove mysql-server-5.5 and all depending packages.

      However, the configuration of package mariadb-server-10.0 fails with this error:
      trying to overwrite '/usr/share/mysql/mysql_system_tables.sql, which is also in package mysql-server-core-5.5
      (All details in attached screenshot).

      How can I fix this problem?

      THX

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            elenst Elena Stepanova added a comment -

            Hi,

            Could you please point at the best practice guide that you are following? It should probably be updated or fixed.

            Installing deb packages manually (i.e. without a package manager like apt-get or similar) is not recommended as best practice, although should be possible. But I don't think dpkg is even expected to take care of dependencies, replacements and such, is it? If you want to install the server this way, you should remove the previous installation.

            Note: If you do it carefully, your datadir shouldn't be touched, but creating a backup before an upgrade of any kind is always recommended as the best practice.

            Alternatively, you can use a package manager. Normally it would take care of the upgrade, although on Trusty which you are apparently using there is a problem described in MDEV-5977 which you might also encounter. If you do, you can find a workaround in the description of the bug report.

            See also https://mariadb.com/kb/en/mariadb/documentation/getting-started/binary-packages/installing-mariadb-deb-files/ for some more information about possible installation issues and their resolution.

            Show
            elenst Elena Stepanova added a comment - Hi, Could you please point at the best practice guide that you are following? It should probably be updated or fixed. Installing deb packages manually (i.e. without a package manager like apt-get or similar) is not recommended as best practice, although should be possible. But I don't think dpkg is even expected to take care of dependencies, replacements and such, is it? If you want to install the server this way, you should remove the previous installation. Note: If you do it carefully, your datadir shouldn't be touched, but creating a backup before an upgrade of any kind is always recommended as the best practice. Alternatively, you can use a package manager. Normally it would take care of the upgrade, although on Trusty which you are apparently using there is a problem described in MDEV-5977 which you might also encounter. If you do, you can find a workaround in the description of the bug report. See also https://mariadb.com/kb/en/mariadb/documentation/getting-started/binary-packages/installing-mariadb-deb-files/ for some more information about possible installation issues and their resolution.
            Hide
            danblack Daniel Black added a comment -

            looks like you need to remove mysql-server-core-5.5 too. Care not to purge anything otherwise your data may go too.

            dpkg -l | egrep '(mysql|mariadb)' to see if any existing packages are pulling this in.

            Once installed you may get some config errors that show up in the error log. These are fixed by replacing the erroneous directives with the modern 10 equivalents or removing them.

            Show
            danblack Daniel Black added a comment - looks like you need to remove mysql-server-core-5.5 too. Care not to purge anything otherwise your data may go too. dpkg -l | egrep '(mysql|mariadb)' to see if any existing packages are pulling this in. Once installed you may get some config errors that show up in the error log. These are fixed by replacing the erroneous directives with the modern 10 equivalents or removing them.
            Hide
            c.monty Thomas added a comment - - edited

            I repeated the installation attempt and can now completely document the installation process with apt:
            1. To verify what version of mysql-server is installed

            thomas@vm4-zentyal64:~$ apt-cache policy mysql-server
            mysql-server:
              Installiert:           5.5.40-0ubuntu0.14.04.1
              Installationskandidat: 5.5.40-0ubuntu0.14.04.1
              Versionstabelle:
             *** 5.5.40-0ubuntu0.14.04.1 0
                    500 http://de.archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
                    500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
                    100 /var/lib/dpkg/status
                 5.5.35+dfsg-1ubuntu1 0
                    500 http://de.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
            thomas@vm4-zentyal64:~$ apt-cache policy mysql-server-5.5
            mysql-server-5.5:
              Installiert:           5.5.40-0ubuntu0.14.04.1
              Installationskandidat: 5.5.40-0ubuntu0.14.04.1
            

            2. To verify what version of MariaDB is available:

            thomas@vm4-zentyal64:~$ apt-cache policy mariadb-server
            mariadb-server:
              Installiert:           (keine)
              Installationskandidat: 10.0.15+maria-1~trusty
              Versionstabelle:
                 10.0.15+maria-1~trusty 0
                    500 http://mirror2.hs-esslingen.de/mariadb/repo/10.0/ubuntu/ trusty/main amd64 

            Packages

                 5.5.40-0ubuntu0.14.04.1 0
                    500 http://de.archive.ubuntu.com/ubuntu/ trusty-updates/universe amd64 Packages
                    500 http://security.ubuntu.com/ubuntu/ trusty-security/universe amd64 Packages
                 5.5.36-1 0
                    500 http://de.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages
            

            3. The installation process using apt:

            thomas@vm4-zentyal64:~$ sudo apt-get install mariadb-server
            Paketlisten werden gelesen... Fertig
            Abhängigkeitsbaum wird aufgebaut.       
            Statusinformationen werden eingelesen.... Fertig
            Die folgenden zusätzlichen Pakete werden installiert:
              libmariadbclient18 libmysqlclient18 mariadb-client-10.0
              mariadb-client-core-10.0 mariadb-server-10.0 mariadb-server-core-10.0
            Vorgeschlagene Pakete:
              tinyca mailx mariadb-test
            Empfohlene Pakete:
              libhtml-template-perl
            Die folgenden Pakete werden ENTFERNT:
              mysql-client-5.5 mysql-client-core-5.5 mysql-server mysql-server-5.5
              mysql-server-core-5.5
            Die folgenden NEUEN Pakete werden installiert:
              libmariadbclient18 mariadb-client-10.0 mariadb-client-core-10.0
              mariadb-server mariadb-server-10.0 mariadb-server-core-10.0
            Die folgenden Pakete werden aktualisiert (Upgrade):
              libmysqlclient18
            1 aktualisiert, 6 neu installiert, 5 zu entfernen und 2 nicht aktualisiert.
            Es müssen 12,6 MB an Archiven heruntergeladen werden.
            Nach dieser Operation werden 36,1 MB Plattenplatz zusätzlich benutzt.
            Möchten Sie fortfahren? [J/n] 
            Holen: 1 http://mirror2.hs-esslingen.de/mariadb/repo/10.0/ubuntu/ trusty/main mariadb-server-10.0 amd64 10.0.15+maria-1~trusty [5.958 kB]
            Holen: 2 http://mirror2.hs-esslingen.de/mariadb/repo/10.0/ubuntu/ trusty/main libmysqlclient18 amd64 10.0.15+maria-1~trusty [2.886 B]
            Holen: 3 http://mirror2.hs-esslingen.de/mariadb/repo/10.0/ubuntu/ trusty/main libmariadbclient18 amd64 10.0.15+maria-1~trusty [565 kB]
            Holen: 4 http://mirror2.hs-esslingen.de/mariadb/repo/10.0/ubuntu/ trusty/main mariadb-client-core-10.0 amd64 10.0.15+maria-1~trusty [665 kB]
            Holen: 5 http://mirror2.hs-esslingen.de/mariadb/repo/10.0/ubuntu/ trusty/main mariadb-client-10.0 amd64 10.0.15+maria-1~trusty [1.014 kB]
            Holen: 6 http://mirror2.hs-esslingen.de/mariadb/repo/10.0/ubuntu/ trusty/main mariadb-server-core-10.0 amd64 10.0.15+maria-1~trusty [4.361 kB]
            Holen: 7 http://mirror2.hs-esslingen.de/mariadb/repo/10.0/ubuntu/ trusty/main mariadb-server all 10.0.15+maria-1~trusty [2.924 B]
            Es wurden 12,6 MB in 3 s geholt (3.279 kB/s).
            Vorkonfiguration der Pakete ...
            dpkg: mysql-server: Abhängigkeitsprobleme, wird aber wie gefordert dennoch entfernt:
             zentyal-core hängt ab von mysql-server; aber:
              Paket mysql-server soll entfernt werden.
            
            (Lese Datenbank ... 85280 Dateien und Verzeichnisse sind derzeit installiert.)
            Entfernen von mysql-server (5.5.40-0ubuntu0.14.04.1) ...
            Entfernen von mysql-server-5.5 (5.5.40-0ubuntu0.14.04.1) ...
            mysql stop/waiting
            Trigger für man-db (2.6.7.1-1ubuntu1) werden verarbeitet ...
            (Lese Datenbank ... 85202 Dateien und Verzeichnisse sind derzeit installiert.)
            Vorbereitung zum Entpacken von .../mariadb-server-10.0_10.0.15+maria-1~trusty_amd64.deb ...
            Entpacken von mariadb-server-10.0 (10.0.15+maria-1~trusty) ...
            dpkg: Fehler beim Bearbeiten des Archivs /var/cache/apt/archives/mariadb-server-10.0_10.0.15+maria-1~trusty_amd64.deb (--unpack):
             Versuch, »/usr/share/mysql/mysql_system_tables.sql« zu überschreiben, welches auch in Paket mysql-server-core-5.5 5.5.40-0ubuntu0.14.04.1 ist
            dpkg-deb: Fehler: Unterprozess einfügen wurde durch Signal (Broken pipe) getötet
            Fehler traten auf beim Bearbeiten von:
             /var/cache/apt/archives/mariadb-server-10.0_10.0.15+maria-1~trusty_amd64.deb
            E: Sub-process /usr/bin/dpkg returned an error code (1)
            

            Removing the package mysql-server-core-5.5 is not really an option because there are dependencies to other packages I don't want to remove. But I assume this is then potentially an issue I should address to the developers of the dependent packages.

            Show
            c.monty Thomas added a comment - - edited I repeated the installation attempt and can now completely document the installation process with apt: 1. To verify what version of mysql-server is installed thomas@vm4-zentyal64:~$ apt-cache policy mysql-server mysql-server: Installiert: 5.5.40-0ubuntu0.14.04.1 Installationskandidat: 5.5.40-0ubuntu0.14.04.1 Versionstabelle: *** 5.5.40-0ubuntu0.14.04.1 0 500 http://de.archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages 500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages 100 /var/lib/dpkg/status 5.5.35+dfsg-1ubuntu1 0 500 http://de.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages thomas@vm4-zentyal64:~$ apt-cache policy mysql-server-5.5 mysql-server-5.5: Installiert: 5.5.40-0ubuntu0.14.04.1 Installationskandidat: 5.5.40-0ubuntu0.14.04.1 2. To verify what version of MariaDB is available: thomas@vm4-zentyal64:~$ apt-cache policy mariadb-server mariadb-server: Installiert: (keine) Installationskandidat: 10.0.15+maria-1~trusty Versionstabelle: 10.0.15+maria-1~trusty 0 500 http://mirror2.hs-esslingen.de/mariadb/repo/10.0/ubuntu/ trusty/main amd64 Packages 5.5.40-0ubuntu0.14.04.1 0 500 http://de.archive.ubuntu.com/ubuntu/ trusty-updates/universe amd64 Packages 500 http://security.ubuntu.com/ubuntu/ trusty-security/universe amd64 Packages 5.5.36-1 0 500 http://de.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages 3. The installation process using apt: thomas@vm4-zentyal64:~$ sudo apt-get install mariadb-server Paketlisten werden gelesen... Fertig Abhängigkeitsbaum wird aufgebaut. Statusinformationen werden eingelesen.... Fertig Die folgenden zusätzlichen Pakete werden installiert: libmariadbclient18 libmysqlclient18 mariadb-client-10.0 mariadb-client-core-10.0 mariadb-server-10.0 mariadb-server-core-10.0 Vorgeschlagene Pakete: tinyca mailx mariadb-test Empfohlene Pakete: libhtml-template-perl Die folgenden Pakete werden ENTFERNT: mysql-client-5.5 mysql-client-core-5.5 mysql-server mysql-server-5.5 mysql-server-core-5.5 Die folgenden NEUEN Pakete werden installiert: libmariadbclient18 mariadb-client-10.0 mariadb-client-core-10.0 mariadb-server mariadb-server-10.0 mariadb-server-core-10.0 Die folgenden Pakete werden aktualisiert (Upgrade): libmysqlclient18 1 aktualisiert, 6 neu installiert, 5 zu entfernen und 2 nicht aktualisiert. Es müssen 12,6 MB an Archiven heruntergeladen werden. Nach dieser Operation werden 36,1 MB Plattenplatz zusätzlich benutzt. Möchten Sie fortfahren? [J/n] Holen: 1 http://mirror2.hs-esslingen.de/mariadb/repo/10.0/ubuntu/ trusty/main mariadb-server-10.0 amd64 10.0.15+maria-1~trusty [5.958 kB] Holen: 2 http://mirror2.hs-esslingen.de/mariadb/repo/10.0/ubuntu/ trusty/main libmysqlclient18 amd64 10.0.15+maria-1~trusty [2.886 B] Holen: 3 http://mirror2.hs-esslingen.de/mariadb/repo/10.0/ubuntu/ trusty/main libmariadbclient18 amd64 10.0.15+maria-1~trusty [565 kB] Holen: 4 http://mirror2.hs-esslingen.de/mariadb/repo/10.0/ubuntu/ trusty/main mariadb-client-core-10.0 amd64 10.0.15+maria-1~trusty [665 kB] Holen: 5 http://mirror2.hs-esslingen.de/mariadb/repo/10.0/ubuntu/ trusty/main mariadb-client-10.0 amd64 10.0.15+maria-1~trusty [1.014 kB] Holen: 6 http://mirror2.hs-esslingen.de/mariadb/repo/10.0/ubuntu/ trusty/main mariadb-server-core-10.0 amd64 10.0.15+maria-1~trusty [4.361 kB] Holen: 7 http://mirror2.hs-esslingen.de/mariadb/repo/10.0/ubuntu/ trusty/main mariadb-server all 10.0.15+maria-1~trusty [2.924 B] Es wurden 12,6 MB in 3 s geholt (3.279 kB/s). Vorkonfiguration der Pakete ... dpkg: mysql-server: Abhängigkeitsprobleme, wird aber wie gefordert dennoch entfernt: zentyal-core hängt ab von mysql-server; aber: Paket mysql-server soll entfernt werden. (Lese Datenbank ... 85280 Dateien und Verzeichnisse sind derzeit installiert.) Entfernen von mysql-server (5.5.40-0ubuntu0.14.04.1) ... Entfernen von mysql-server-5.5 (5.5.40-0ubuntu0.14.04.1) ... mysql stop/waiting Trigger für man-db (2.6.7.1-1ubuntu1) werden verarbeitet ... (Lese Datenbank ... 85202 Dateien und Verzeichnisse sind derzeit installiert.) Vorbereitung zum Entpacken von .../mariadb-server-10.0_10.0.15+maria-1~trusty_amd64.deb ... Entpacken von mariadb-server-10.0 (10.0.15+maria-1~trusty) ... dpkg: Fehler beim Bearbeiten des Archivs /var/cache/apt/archives/mariadb-server-10.0_10.0.15+maria-1~trusty_amd64.deb (--unpack): Versuch, »/usr/share/mysql/mysql_system_tables.sql« zu überschreiben, welches auch in Paket mysql-server-core-5.5 5.5.40-0ubuntu0.14.04.1 ist dpkg-deb: Fehler: Unterprozess einfügen wurde durch Signal (Broken pipe) getötet Fehler traten auf beim Bearbeiten von: /var/cache/apt/archives/mariadb-server-10.0_10.0.15+maria-1~trusty_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1) Removing the package mysql-server-core-5.5 is not really an option because there are dependencies to other packages I don't want to remove. But I assume this is then potentially an issue I should address to the developers of the dependent packages.
            Hide
            elenst Elena Stepanova added a comment -

            Otto Kekäläinen,

            Any thoughts and recommendations on what (if anything) should be done on our side will be much appreciated.

            Show
            elenst Elena Stepanova added a comment - Otto Kekäläinen , Any thoughts and recommendations on what (if anything) should be done on our side will be much appreciated.
            Hide
            c.monty Thomas added a comment - - edited

            OK. I would appreciate a statement regarding the root cause.
            According to my understanding, the potential root cause is either related to MariaDB replacing an existing MySQL installation or it is related to the other packages installed having reverse dependency to package mysql-server-5.5.

            For the first case, I might force package mangement to overwrite file "/usr/share/mysql/mysql_system_tables.sql" belonging to package mysql-server-core-5.5 using dpkg --force overwrite <package>.deb.
            However I'm not sure if I risk system failure.

            For the latest, could this be verified by releasing the dependency to mysql-server-5.5? If yes, how can I do that?

            Show
            c.monty Thomas added a comment - - edited OK. I would appreciate a statement regarding the root cause. According to my understanding, the potential root cause is either related to MariaDB replacing an existing MySQL installation or it is related to the other packages installed having reverse dependency to package mysql-server-5.5. For the first case, I might force package mangement to overwrite file "/usr/share/mysql/mysql_system_tables.sql" belonging to package mysql-server-core-5.5 using dpkg --force overwrite <package>.deb. However I'm not sure if I risk system failure. For the latest, could this be verified by releasing the dependency to mysql-server-5.5? If yes, how can I do that?
            Hide
            jb-boin Jean Weisbuch added a comment -

            It seems that you are using a Zentyal Ubuntu distro, which version is that?

            In the past, Zentyal packages were depending on mysql-server-5.5 while it should have been depending on mysql-server metapackage, making the migration to MariaDB impossible (without forcing packages installation), i dont understand German but it seems that the error message is related.

            Here is the report i did on Zentyal 3.0 almost 2 years ago : http://oldtracker.zentyal.org/ticket/6606
            Its stated that it should have been fixed on Zentyal 3.1 but i never got to upgrade to it so i cant confirm it has been fixed.

            Show
            jb-boin Jean Weisbuch added a comment - It seems that you are using a Zentyal Ubuntu distro, which version is that? In the past, Zentyal packages were depending on mysql-server-5.5 while it should have been depending on mysql-server metapackage, making the migration to MariaDB impossible (without forcing packages installation), i dont understand German but it seems that the error message is related. Here is the report i did on Zentyal 3.0 almost 2 years ago : http://oldtracker.zentyal.org/ticket/6606 Its stated that it should have been fixed on Zentyal 3.1 but i never got to upgrade to it so i cant confirm it has been fixed.
            Hide
            c.monty Thomas added a comment -

            Confirm the comment of Jean... actually I have created a new ticket with Zentyal incl. the reference to Jean's old ticket:
            https://tracker.zentyal.org/issues/2876

            In the meantime I fixed the issue by installing the package with dpkg -i --force-overwrite
            dpkg -i --force-overwrite /var/cache/apt/archives/mariadb-server-10.0_10.0.15+maria-1~trusty_amd64.deb

            Finally I ran mysql_upgrade -u root -p and mysql_secure_installation without any errors.

            Show
            c.monty Thomas added a comment - Confirm the comment of Jean... actually I have created a new ticket with Zentyal incl. the reference to Jean's old ticket: https://tracker.zentyal.org/issues/2876 In the meantime I fixed the issue by installing the package with dpkg -i --force-overwrite dpkg -i --force-overwrite /var/cache/apt/archives/mariadb-server-10.0_10.0.15+maria-1~trusty_amd64.deb Finally I ran mysql_upgrade -u root -p and mysql_secure_installation without any errors.
            Hide
            otto Otto Kekäläinen added a comment -

            This is an issue in Zentyal dependencies or documentation. On normal Ubuntu systems 'apt-get install mariadb-server' works just fine and there is no need for complex manual dpkg -i -commands.

            Show
            otto Otto Kekäläinen added a comment - This is an issue in Zentyal dependencies or documentation. On normal Ubuntu systems 'apt-get install mariadb-server' works just fine and there is no need for complex manual dpkg -i -commands.

              People

              • Assignee:
                otto Otto Kekäläinen
                Reporter:
                c.monty Thomas
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: