Bug #72722 | MySQL from apt repo broken by mysql installation from Ubuntu repo | ||
---|---|---|---|
Submitted: | 22 May 2014 9:48 | Modified: | 23 May 2014 7:11 |
Reporter: | Shahriyar Rzayev | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: Installing | Severity: | S3 (Non-critical) |
Version: | 5.6.17 | OS: | Linux (Ubuntu 14.04) |
Assigned to: | Akhil Mohan | CPU Architecture: | Any |
[22 May 2014 9:48]
Shahriyar Rzayev
[22 May 2014 16:19]
Akhil Mohan
Hi Shahriyar, Thanks for your effort in testing the repos and giving us feedback but unfortunately you ran into an unsupported use case from our side. Currently, it is not possible to install the native repo packages when either MySQL APT repo is configured or packages from the MySQL APT repo are installed. You will need to first remove the installed packages and MySQL APT repo configuration. After this you can perform a fresh installation of native repo packages. Additionally, I would add that if you try the other way round by installing the native repo packages first, then it will be possible for you to configure MySQL APT Repo. After that you can install 5.6 that will perform in-place replacement of the native repo packages.
[23 May 2014 6:03]
Shahriyar Rzayev
Dear Akhil Mohan, Thank you for a thorough explanation... After failed installation i removed all native and all APT mysql packages and tried to install again from APT: sh@sh-work:~$ sudo apt-get remove mysql-client-core-5.6 Reading package lists... Done Building dependency tree Reading state information... Done Package 'mysql-client-core-5.6' is not installed, so not removed 0 upgraded, 0 newly installed, 0 to remove and 41 not upgraded. sh@sh-work:~$ sudo apt-get remove mysql-server-core-5.6 Reading package lists... Done Building dependency tree Reading state information... Done Package 'mysql-server-core-5.6' is not installed, so not removed 0 upgraded, 0 newly installed, 0 to remove and 41 not upgraded. sh@sh-work:~$ sudo apt-get install mysql-server Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: mysql-common mysql-community-client mysql-community-server The following NEW packages will be installed: mysql-common mysql-community-client mysql-community-server mysql-server 0 upgraded, 4 newly installed, 0 to remove and 41 not upgraded. Need to get 0 B/22,5 MB of archives. After this operation, 159 MB of additional disk space will be used. Do you want to continue? [Y/n] Y Preconfiguring packages ... Selecting previously unselected package mysql-common. (Reading database ... 210052 files and directories currently installed.) Preparing to unpack .../mysql-common_5.6.17-1ubuntu14.04_amd64.deb ... Unpacking mysql-common (5.6.17-1ubuntu14.04) ... Selecting previously unselected package mysql-community-server. Preparing to unpack .../mysql-community-server_5.6.17-1ubuntu14.04_amd64.deb ... Unpacking mysql-community-server (5.6.17-1ubuntu14.04) ... Selecting previously unselected package mysql-community-client. Preparing to unpack .../mysql-community-client_5.6.17-1ubuntu14.04_amd64.deb ... Unpacking mysql-community-client (5.6.17-1ubuntu14.04) ... Selecting previously unselected package mysql-server. Preparing to unpack .../mysql-server_5.6.17-1ubuntu14.04_amd64.deb ... Unpacking mysql-server (5.6.17-1ubuntu14.04) ... Processing triggers for man-db (2.6.7.1-1) ... Processing triggers for ureadahead (0.100.0-16) ... ureadahead will be reprofiled on next reboot Setting up mysql-common (5.6.17-1ubuntu14.04) ... Setting up mysql-community-server (5.6.17-1ubuntu14.04) ... start: Job failed to start invoke-rc.d: initscript mysql, action "start" failed. dpkg: error processing package mysql-community-server (--configure): subprocess installed post-installation script returned error exit status 1 Setting up mysql-community-client (5.6.17-1ubuntu14.04) ... dpkg: dependency problems prevent configuration of mysql-server: mysql-server depends on mysql-community-server (= 5.6.17-1ubuntu14.04); however: Package mysql-community-server is not configured yet. dpkg: error processing package mysql-server (--configure): dependency problems - leaving unconfigured No apport report written because the error message indicates its a followup error from a previous failure. Errors were encountered while processing: mysql-community-server mysql-server E: Sub-process /usr/bin/dpkg returned an error code (1) Also after failed install i tried to remove: sh@sh-work:~$ sudo apt-get remove mysql-server Reading package lists... Done Building dependency tree Reading state information... Done Package 'mysql-server' is not installed, so not removed The following packages were automatically installed and are no longer required: mysql-common mysql-community-client mysql-community-server Use 'apt-get autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 41 not upgraded. 1 not fully installed or removed. After this operation, 0 B of additional disk space will be used. Setting up mysql-community-server (5.6.17-1ubuntu14.04) ... start: Job failed to start invoke-rc.d: initscript mysql, action "start" failed. dpkg: error processing package mysql-community-server (--configure): subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing: mysql-community-server E: Sub-process /usr/bin/dpkg returned an error code (1) And only autoremove does not show any error: sh@sh-work:~$ sudo apt-get autoremove Reading package lists... Done Building dependency tree Reading state information... Done The following packages will be REMOVED: mysql-common mysql-community-client mysql-community-server 0 upgraded, 0 newly installed, 3 to remove and 41 not upgraded. 1 not fully installed or removed. After this operation, 159 MB disk space will be freed. Do you want to continue? [Y/n] Y (Reading database ... 210269 files and directories currently installed.) Removing mysql-community-server (5.6.17-1ubuntu14.04) ... Removing mysql-community-client (5.6.17-1ubuntu14.04) ... Removing mysql-common (5.6.17-1ubuntu14.04) ... Processing triggers for man-db (2.6.7.1-1) ...
[23 May 2014 6:33]
Akhil Mohan
I can understand the pain of having your system in inconsistent state but lets not worry about the whole situation and take it step by step to get the system clean. First lets see the current state of all the mysql packages on machine using: dpkg -l | grep mysql (Please paste the output excluding last column) The first column denotes the current status of the package. Here are the possible options: ii) Installed rc) Removed config-files kept (This should be the state of all the packages you have removed with 'apt-get remove' that does not remove config-files under /etc) For this to work, you will need to run 'apt-get purge <pkg-name>' till you do not see any packages in the above list. Please remember that some non-mysql-server packages like python-mysql.connector and python-mysqldb, if installed, need not be removed as they do not have any affect on this situation but if removed might cause trouble to applications using them. We will definitely try to re-visit our docs to see how can we safeguard users from getting into this trouble. Thanks for sharing your feedback in detail with us.
[23 May 2014 6:55]
Shahriyar Rzayev
:) Thank you for a great assist... root@sh-work:~# dpkg -l | grep mysql rc libmysqlclient18:amd64 5.6.17-1ubuntu14.04 amd64 MySQL shared client libraries rc libmysqlclient18:i386 5.6.17-1ubuntu14.04 i386 MySQL shared client libraries rc libmysqlcppconn7 1.1.3-5 amd64 MySQL Connector for C++ (library) ii mysql-apt-config 0.1.5-1ubuntu14.04 all Auto Config Pkg for MySQL APT Repo. rc mysql-common 5.6.17-1ubuntu14.04 amd64 MySQL Common rc mysql-common-5.6 5.6.17-0ubuntu0.14.04.1 all MySQL 5.6 specific common files, e.g. /etc/mysql/conf.d/my-5.6.cnf rc mysql-community-server 5.6.17-1ubuntu14.04 amd64 MySQL Server ic mysql-server-5.6 5.6.16-1~exp1 amd64 MySQL database server binaries and system database setup ii mysql-utilities 1.3.5-2 all collection of scripts for managing MySQL servers rc mysql-workbench 6.0.8+dfsg-2 amd64 MySQL Workbench - a visual database modeling, administration and queuing tool rc mysql-workbench-community 6.1.6-1ubu1310 amd64 MySQL Workbench ii python-mysql.connector 1.1.6-1 all pure Python implementation of MySQL Client/Server protocol Purged all RCs as you say.. And it works now. Successfully installed from APT repo: root@sh-work:~# mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 Server version: 5.6.17 MySQL Community Server (GPL)
[23 May 2014 7:00]
Akhil Mohan
Congratulations ! Enjoy the MySQL APT Repo and keep coming back to us in case you have issues or feedback! It is okay to close the bug now ?
[23 May 2014 7:05]
Shahriyar Rzayev
Sure it is really closed now :) Thank you for this repo. It is hugely minimize the effort that we do while installing 5.6 versions of MySQL on Ubuntu machines.
[23 May 2014 7:11]
Akhil Mohan
Thanks for your kind words and it is really great to see MySQL APT Repo improving user experience.
[23 Jan 2017 17:37]
Ivan Leon ivanlmj
Just an observation, in a very particular situation. I was creating a Docker container (Ubuntu 14.04), with a volume that was mounting an specific directory from my host machine to the '/tmp' inside the container, and that was my problem: many softwares, in their processes of installation, use the '/tmp' directory for their temporary files, which is something very obvious. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ docker create --net=host --name tdm_sandbox -v /home/ivanlmj/docker_volume:/tmp -it ubuntu:latest bash +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ During the installation of the package 'mysql-server', I was receiving the same error messages from apt: +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ mysql-server depends on mysql-community-server; however: Package mysql-community-server is not configured yet. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Checking /var/log/mysql/error.log, I found this: +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ mysqld: Can't create/write to file '/tmp/ibIF4WuY' (Errcode: 13 - Permission denied) 2017-01-23T17:03:23.137110Z 0 [ERROR] InnoDB: Unable to create temporary file; errno: 13 2017-01-23T17:03:23.137119Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error 2017-01-23T17:03:23.137123Z 0 [ERROR] Plugin 'InnoDB' init function returned error. 2017-01-23T17:03:23.137126Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. 2017-01-23T17:03:23.137129Z 0 [ERROR] Failed to initialize plugins. 2017-01-23T17:03:23.137132Z 0 [ERROR] Aborting +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Then, I realized that I have used '/tmp' directory for mounting a directory from host machine, and with this, '/tmp' was unavailable for anything that could need its usage. Event the owner/group were configured with strange UID and GID were not in accordance with the majority of the directories under '/': ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ root@ilg40:/# ll total 72 drwxr-xr-x 47 root root 4096 Jan 23 16:59 ./ drwxr-xr-x 47 root root 4096 Jan 23 16:59 ../ -rwxr-xr-x 1 root root 0 Jan 23 16:11 .dockerenv* -rwxr-xr-x 1 root root 0 Jan 23 16:11 .dockerinit* drwxr-xr-x 2 root root 4096 Jan 23 17:01 bin/ drwxr-xr-x 2 root root 4096 Apr 10 2014 boot/ drwxr-xr-x 5 root root 380 Jan 23 16:11 dev/ drwxr-xr-x 104 root root 4096 Jan 23 17:03 etc/ drwxr-xr-x 2 root root 4096 Apr 10 2014 home/ drwxr-xr-x 18 root root 4096 Jan 23 17:01 lib/ drwxr-xr-x 2 root root 4096 Jan 23 16:59 lib64/ drwxr-xr-x 2 root root 4096 Jun 30 2015 media/ drwxr-xr-x 2 root root 4096 Apr 10 2014 mnt/ drwxr-xr-x 2 root root 4096 Jun 30 2015 opt/ dr-xr-xr-x 263 root root 0 Jan 23 16:11 proc/ drwx------ 2 root root 4096 Jan 23 16:23 root/ drwxr-xr-x 8 root root 4096 Jan 23 17:02 run/ drwxr-xr-x 2 root root 4096 Jan 23 17:01 sbin/ drwxr-xr-x 2 root root 4096 Jun 30 2015 srv/ dr-xr-xr-x 13 root root 0 Jan 23 16:21 sys/ drwxrwxr-x 2 1000 1000 4096 Jan 23 17:03 tmp/ drwxr-xr-x 17 root root 4096 Jan 23 17:01 usr/ drwxr-xr-x 15 root root 4096 Jan 23 16:19 var/ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ It has happened to me with MySQL 5.6.17 and MySQL 5.7.17 too. Regards and never mount anything over '/tmp' directly. @ivanleoncz ivanlmj@gmail.com
[18 Jan 2018 15:26]
Anto Ronson
Hello I am also facing the same problem. I tried repeating the above discussed solutions, but the error repeats itself sudo apt-get install mysql-server Paketlisten werden gelesen... Fertig Abhängigkeitsbaum wird aufgebaut. Statusinformationen werden eingelesen.... Fertig Das folgende Paket wurde automatisch installiert und wird nicht mehr benötigt: libevent-core-2.0-5 Verwenden Sie »sudo apt autoremove«, um es zu entfernen. Die folgenden zusätzlichen Pakete werden Installiert libmecab2 mysql-client mysql-common mysql-community-client mysql-community-server Die folgenden NEUEN Pakete werden installiert: libmecab2 mysql-client mysql-common mysql-community-client mysql-community-server mysql-server 0 aktualisiert, 6 neu installiert, 0 zu entfernen und 1 nicht aktualisiert. Es müssen 33,5 MB an Archiven heruntergeladen werden. Nach dieser Operation werden 241 MB Plattenplatz zusätzlich benutzt. Möchten Sie fortfahren? [J/n] j Holen:1 http://de.archive.ubuntu.com/ubuntu xenial/universe amd64 libmecab2 amd64 0.996-1.2ubuntu1 [264 kB] Holen:2 http://repo.mysql.com/apt/ubuntu xenial/mysql-5.7 amd64 mysql-common amd64 5.7.21-1ubuntu16.04 [63,5 kB] Holen:3 http://repo.mysql.com/apt/ubuntu xenial/mysql-5.7 amd64 mysql-community-client amd64 5.7.21-1ubuntu16.04 [7.853 kB] Holen:4 http://repo.mysql.com/apt/ubuntu xenial/mysql-5.7 amd64 mysql-client amd64 5.7.21-1ubuntu16.04 [12,3 kB] Holen:5 http://repo.mysql.com/apt/ubuntu xenial/mysql-5.7 amd64 mysql-community-server amd64 5.7.21-1ubuntu16.04 [25,3 MB] Holen:6 http://repo.mysql.com/apt/ubuntu xenial/mysql-5.7 amd64 mysql-server amd64 5.7.21-1ubuntu16.04 [12,3 kB] Es wurden 33,5 MB in 32 s geholt (1.017 kB/s). Vorkonfiguration der Pakete ... Vormals nicht ausgewähltes Paket mysql-common wird gewählt. (Lese Datenbank ... 180654 Dateien und Verzeichnisse sind derzeit installiert.) Vorbereitung zum Entpacken von .../mysql-common_5.7.21-1ubuntu16.04_amd64.deb ... Entpacken von mysql-common (5.7.21-1ubuntu16.04) ... Vormals nicht ausgewähltes Paket mysql-community-client wird gewählt. Vorbereitung zum Entpacken von .../mysql-community-client_5.7.21-1ubuntu16.04_amd64.deb ... Entpacken von mysql-community-client (5.7.21-1ubuntu16.04) ... Vormals nicht ausgewähltes Paket mysql-client wird gewählt. Vorbereitung zum Entpacken von .../mysql-client_5.7.21-1ubuntu16.04_amd64.deb ... Entpacken von mysql-client (5.7.21-1ubuntu16.04) ... Vormals nicht ausgewähltes Paket libmecab2 wird gewählt. Vorbereitung zum Entpacken von .../libmecab2_0.996-1.2ubuntu1_amd64.deb ... Entpacken von libmecab2 (0.996-1.2ubuntu1) ... Vormals nicht ausgewähltes Paket mysql-community-server wird gewählt. Vorbereitung zum Entpacken von .../mysql-community-server_5.7.21-1ubuntu16.04_amd64.deb ... Entpacken von mysql-community-server (5.7.21-1ubuntu16.04) ... Vormals nicht ausgewähltes Paket mysql-server wird gewählt. Vorbereitung zum Entpacken von .../mysql-server_5.7.21-1ubuntu16.04_amd64.deb ... Entpacken von mysql-server (5.7.21-1ubuntu16.04) ... Trigger für man-db (2.7.5-1) werden verarbeitet ... Trigger für libc-bin (2.23-0ubuntu10) werden verarbeitet ... Trigger für systemd (229-4ubuntu21) werden verarbeitet ... Trigger für ureadahead (0.100.0-19) werden verarbeitet ... mysql-common (5.7.21-1ubuntu16.04) wird eingerichtet ... update-alternatives: /etc/mysql/my.cnf.fallback wird verwendet, um /etc/mysql/my.cnf (my.cnf) im automatischen Modus bereitzustellen mysql-community-client (5.7.21-1ubuntu16.04) wird eingerichtet ... mysql-client (5.7.21-1ubuntu16.04) wird eingerichtet ... libmecab2 (0.996-1.2ubuntu1) wird eingerichtet ... mysql-community-server (5.7.21-1ubuntu16.04) wird eingerichtet ... update-alternatives: /etc/mysql/mysql.cnf wird verwendet, um /etc/mysql/my.cnf (my.cnf) im automatischen Modus bereitzustellen Job for mysql.service failed because the control process exited with error code. See "systemctl status mysql.service" and "journalctl -xe" for details. invoke-rc.d: initscript mysql, action "start" failed. ● mysql.service - MySQL Community Server Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Do 2018-01-18 16:22:10 CET; 52ms ago Process: 12471 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid (code=exited, status=1/FAILURE) Process: 12404 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS) Main PID: 9319 (code=exited, status=1/FAILURE) Jan 18 16:22:07 roboXperts systemd[1]: Starting MySQL Community Server... Jan 18 16:22:09 roboXperts mysqld[12471]: Initialization of mysqld failed: 0 Jan 18 16:22:09 roboXperts systemd[1]: mysql.service: Control process exite...=1 Jan 18 16:22:10 roboXperts systemd[1]: Failed to start MySQL Community Server. Jan 18 16:22:10 roboXperts systemd[1]: mysql.service: Unit entered failed state. Jan 18 16:22:10 roboXperts systemd[1]: mysql.service: Failed with result 'e...'. Hint: Some lines were ellipsized, use -l to show in full. dpkg: Fehler beim Bearbeiten des Paketes mysql-community-server (--configure): Unterprozess installiertes post-installation-Skript gab den Fehlerwert 1 zurück dpkg: Abhängigkeitsprobleme verhindern Konfiguration von mysql-server: mysql-server hängt ab von mysql-community-server (= 5.7.21-1ubuntu16.04); aber: Paket mysql-community-server ist noch nicht konfiguriert. dpkg: Fehler beim Bearbeiten des Paketes mysql-server (--configure): Abhängigkeitsprobleme - verbleibt unkonfiguriert Trigger für libc-bin (2.23-0ubuntu10) werden verarbeitet ... Es wurde kein Apport-Bericht verfasst, da die Fehlermeldung darauf hindeutet, dass dies lediglich ein Folgefehler eines vorherigen Problems ist. Trigger für systemd (229-4ubuntu21) werden verarbeitet ... Trigger für ureadahead (0.100.0-19) werden verarbeitet ... Fehler traten auf beim Bearbeiten von: mysql-community-server mysql-server E: Sub-process /usr/bin/dpkg returned an error code (1)
[19 Feb 2020 3:54]
Prathyusha P
But, I got rF mysql-server-5.7 5.7.26-0ubuntu0.18.10.1 amd64 MySQL database server binaries and system database setup can you give a solution for this?
[20 Feb 2020 8:05]
Sreedhar Sreedhargadda
Hello, Can you flush in more detail? What actually are you trying... Can you post full output when you are trying to install