Page 1 of 4 123 ... LastLast
Results 1 to 10 of 31

Thread: Getting mySQL server back on Ubuntu 12.04

  1. #1
    Join Date
    May 2007
    Location
    Europe
    Beans
    280
    Distro
    Ubuntu 16.04 Xenial Xerus

    Getting mySQL server back on Ubuntu 12.04

    Dear all,

    I found out today that the upgrade to Ubuntu 12.04 send out mySQL to the void. I immediately tried to get it back but got an error:

    Code:
    $ sudo apt-get install mysql-server
    [sudo] password for desousa: 
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    The following extra packages will be installed:
      mysql-server-5.5 mysql-server-core-5.5
    Suggested packages:
      tinyca
    The following NEW packages will be installed:
      mysql-server mysql-server-5.5 mysql-server-core-5.5
    0 upgraded, 3 newly installed, 0 to remove and 26 not upgraded.
    Need to get 14.9 MB of archives.
    After this operation, 52.9 MB of additional disk space will be used.
    Do you want to continue [Y/n]? Y
    Get:1 http://de.archive.ubuntu.com/ubuntu/ precise/main mysql-server-core-5.5 amd64 5.5.22-0ubuntu1 [6,022 kB]
    Get:2 http://de.archive.ubuntu.com/ubuntu/ precise/main mysql-server-5.5 amd64 5.5.22-0ubuntu1 [8,816 kB]
    Get:3 http://de.archive.ubuntu.com/ubuntu/ precise/main mysql-server all 5.5.22-0ubuntu1 [11.8 kB]
    Fetched 14.9 MB in 2s (4,960 kB/s)       
    Preconfiguring packages ...
    Selecting previously unselected package mysql-server-core-5.5.
    (Reading database ... 412919 files and directories currently installed.)
    Unpacking mysql-server-core-5.5 (from .../mysql-server-core-5.5_5.5.22-0ubuntu1_amd64.deb) ...
    Selecting previously unselected package mysql-server-5.5.
    Unpacking mysql-server-5.5 (from .../mysql-server-5.5_5.5.22-0ubuntu1_amd64.deb) ...
    dpkg: error processing /var/cache/apt/archives/mysql-server-5.5_5.5.22-0ubuntu1_amd64.deb (--unpack):
     trying to overwrite '/usr/lib/mysql/plugin/ha_example.so', which is also in package libmysqlclient-dev 5.5.23-1~dotdeb.0
    Selecting previously unselected package mysql-server.
    Unpacking mysql-server (from .../mysql-server_5.5.22-0ubuntu1_all.deb) ...
    Processing triggers for man-db ...
    Processing triggers for ureadahead ...
    ureadahead will be reprofiled on next reboot
    Errors were encountered while processing:
     /var/cache/apt/archives/mysql-server-5.5_5.5.22-0ubuntu1_amd64.deb
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    After this mySQL is not available:

    Code:
    $ sudo netstat -tap | grep mysql
    $ sudo /etc/init.d/mysql restart
    sudo: /etc/init.d/mysql: command not found
    The first web search results pointed to an issue with the root password. I tried to reconfigure:

    Code:
    $ sudo dpkg-reconfigure mysql-server
    /usr/sbin/dpkg-reconfigure: mysql-server is broken or not fully installed
    After some more duckduckgoing I found a reference to the old packages disturbing the new installation. Indeed some old packages were still there:

    Code:
    $ dpkg --get-selections | grep mysql
    gambas2-gb-db-mysql				install
    libdbd-mysql-perl				install
    libmysqlclient-dev				install
    libmysqlclient16				install
    libmysqlclient18				install
    libqt4-sql-mysql				install
    mysql-admin					deinstall
    mysql-client-5.5				install
    mysql-client-core-5.5				install
    mysql-common					install
    mysql-query-browser				deinstall
    mysql-server					install
    mysql-server-5.1				deinstall
    mysql-server-core-5.5				install
    mysql-workbench					install
    mysql-workbench-data				install
    python-mysql.connector				install
    
    $ sudo dpkg --purge mysql-admin mysql-query-browser mysql-server-5.1
    (Reading database ... 413009 files and directories currently installed.)
    Removing mysql-admin ...
    Purging configuration files for mysql-admin ...
    Removing mysql-query-browser ...
    Purging configuration files for mysql-query-browser ...
    Removing mysql-server-5.1 ...
    Purging configuration files for mysql-server-5.1 ...
    Processing triggers for ureadahead ...
    
    $ dpkg --get-selections | grep mysql
    gambas2-gb-db-mysql				install
    libdbd-mysql-perl				install
    libmysqlclient-dev				install
    libmysqlclient16				install
    libmysqlclient18				install
    libqt4-sql-mysql				install
    mysql-client-5.5				install
    mysql-client-core-5.5				install
    mysql-common					install
    mysql-server-core-5.5				install
    mysql-workbench					install
    mysql-workbench-data				install
    python-mysql.connector				install
    Still, after purging the old packages I'm getting the same error as above. What is going wrong here? Is mySQL supposed to run on 12.04? If yes how can I install it?

    Thanks.

  2. #2
    Join Date
    May 2007
    Location
    Europe
    Beans
    280
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Getting mySQL server back on Ubuntu 12.04

    There's a new development today. As I tried to run the morning upgrade I got this:

    Code:
    $ sudo apt-get upgrade
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    You might want to run 'apt-get -f install' to correct these.
    The following packages have unmet dependencies:
     mysql-server : Depends: mysql-server-5.5 but it is not installed
    E: Unmet dependencies. Try using -f.
    So I did as it suggested:

    Code:
    $ sudo apt-get -f install
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    Correcting dependencies... Done
    The following extra packages will be installed:
      mysql-server-5.5
    Suggested packages:
      tinyca
    The following NEW packages will be installed:
      mysql-server-5.5
    0 upgraded, 1 newly installed, 0 to remove and 55 not upgraded.
    1 not fully installed or removed.
    Need to get 0 B/8,816 kB of archives.
    After this operation, 32.6 MB of additional disk space will be used.
    Do you want to continue [Y/n]? Y
    Preconfiguring packages ...
    (Reading database ... 413000 files and directories currently installed.)
    Unpacking mysql-server-5.5 (from .../mysql-server-5.5_5.5.22-0ubuntu1_amd64.deb) ...
    dpkg: error processing /var/cache/apt/archives/mysql-server-5.5_5.5.22-0ubuntu1_amd64.deb (--unpack):
     trying to overwrite '/usr/lib/mysql/plugin/ha_example.so', which is also in package libmysqlclient-dev 5.5.23-1~dotdeb.0
    Processing triggers for ureadahead ...
    ureadahead will be reprofiled on next reboot
    Processing triggers for man-db ...
    Errors were encountered while processing:
     /var/cache/apt/archives/mysql-server-5.5_5.5.22-0ubuntu1_amd64.deb
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    So it seems mysql-server has even embroiled the upgrade. Any clues on how to fix this?

    Thank you.

  3. #3
    Join Date
    May 2007
    Location
    Europe
    Beans
    280
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Getting mySQL server back on Ubuntu 12.04

    Today I tried to install mySQL with aptitude to see if something would come up in the log:

    Code:
    $ sudo aptitude install mysql-server
    The following NEW packages will be installed:
      mysql-server mysql-server-5.5{a} 
    0 packages upgraded, 2 newly installed, 0 to remove and 16 not upgraded.
    Need to get 0 B/8,828 kB of archives. After unpacking 32.8 MB will be used.
    Do you want to continue? [Y/n/?] Y
    Preconfiguring packages ...              
    (Reading database ... 413046 files and directories currently installed.)
    Unpacking mysql-server-5.5 (from .../mysql-server-5.5_5.5.22-0ubuntu1_amd64.deb) ...
    dpkg: error processing /var/cache/apt/archives/mysql-server-5.5_5.5.22-0ubuntu1_amd64.deb (--unpack):
     trying to overwrite '/usr/lib/mysql/plugin/ha_example.so', which is also in package libmysqlclient-dev 5.5.23-1~dotdeb.0
    No apport report written because MaxReports is reached already
                                                                  Selecting previously unselected package mysql-server.
    Unpacking mysql-server (from .../mysql-server_5.5.22-0ubuntu1_all.deb) ...
    Processing triggers for ureadahead ...
    ureadahead will be reprofiled on next reboot
    Processing triggers for man-db ...
    Errors were encountered while processing:
     /var/cache/apt/archives/mysql-server-5.5_5.5.22-0ubuntu1_amd64.deb
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    A package failed to install.  Trying to recover:
    dpkg: dependency problems prevent configuration of mysql-server:
     mysql-server depends on mysql-server-5.5; however:
      Package mysql-server-5.5 is not installed.
    dpkg: error processing mysql-server (--configure):
     dependency problems - leaving unconfigured
    Errors were encountered while processing:
     mysql-server
                                             
    Current status: 1 broken [+1].
    
    $ cat /var/log/aptitude
    Aptitude 0.6.6: log report
    Fri, Jun  8 2012 11:26:43 +0200
    
    IMPORTANT: this log only lists intended actions; actions which fail due to
    dpkg problems may not be completed.
    
    Will install 2 packages, and remove 0 packages.
    32.8 MB of disk space will be used
    ===============================================================================
    [HOLD, DEPENDENCIES] libcairo-gobject2:amd64
    [HOLD, DEPENDENCIES] libcairo-gobject2:i386
    [HOLD, DEPENDENCIES] libcairo-script-interpreter2:amd64
    [HOLD, DEPENDENCIES] libcairo2:i386
    [HOLD, DEPENDENCIES] libcairo2-dev:amd64
    [HOLD, DEPENDENCIES] libgdal1-1.7.0:amd64
    [HOLD, DEPENDENCIES] printer-driver-ptouch:amd64
    [HOLD, DEPENDENCIES] rpcbind:amd64
    [INSTALL, DEPENDENCIES] mysql-server-5.5:amd64
    [HOLD] libcairo2:amd64
    [HOLD] libgdal1:amd64
    [HOLD] ptouch-driver:amd64
    [HOLD] python-cupshelpers:amd64
    [HOLD] software-center:amd64
    [HOLD] system-config-printer-common:amd64
    [HOLD] system-config-printer-gnome:amd64
    [HOLD] system-config-printer-udev:amd64
    [INSTALL] mysql-server:amd64
    ===============================================================================
    
    Log complete.
    It doesn't say much to me. Any clues?

    Thank you.

  4. #4
    Join Date
    Jul 2007
    Beans
    17

    Re: Getting mySQL server back on Ubuntu 12.04

    I did a fresh install on three local machine directly from CD with no problem. Leased a dedicated server from 1and1 running Ubuntu 12.04 LTS and had the same problems as you have described. I will keep you in the loop if I figure something out. This is really turning into a pain...

  5. #5
    Join Date
    Jul 2007
    Beans
    17

    Re: Getting mySQL server back on Ubuntu 12.04

    I removed everything related to mysql-server.

    sudo apt-get remove mysql-server

    physically removed all of the files from the following search
    find / -name 'mysql*'

    then, I uninstalled apparmor.
    sudo apt-get remove apparmor

    then, reinstall mysql-server
    sudo apt-get install mysql-server

    it worked and started up. rebooted and it was still working. tried to reinstall apparmor and got the following:


    Setting up apparmor (2.7.102-0ubuntu3) ...
    * Starting AppArmor profiles Skipping profile in /etc/apparmor.d/disable: usr.sbin.rsyslogd
    AppArmor parser error for /etc/apparmor.d/usr.sbin.mysqld in /etc/apparmor.d/tunables/global at line 17: Could not open 'tunables/proc'
    AppArmor parser error for /etc/apparmor.d/sbin.dhclient in /etc/apparmor.d/tunables/global at line 17: Could not open 'tunables/proc'
    AppArmor parser error for /etc/apparmor.d/usr.sbin.tcpdump in /etc/apparmor.d/tunables/global at line 17: Could not open 'tunables/proc'
    [fail]
    invoke-rc.d: initscript apparmor, action "start" failed.
    * Reloading AppArmor profiles Skipping profile in /etc/apparmor.d/disable: usr.sbin.rsyslogd
    AppArmor parser error for /etc/apparmor.d/sbin.dhclient in /etc/apparmor.d/tunables/global at line 17: Could not open 'tunables/proc'
    AppArmor parser error for /etc/apparmor.d/usr.sbin.mysqld in /etc/apparmor.d/tunables/global at line 17: Could not open 'tunables/proc'
    AppArmor parser error for /etc/apparmor.d/usr.sbin.tcpdump in /etc/apparmor.d/tunables/global at line 17: Could not open 'tunables/proc'
    invoke-rc.d: initscript apparmor, action "reload" failed.

    seems like some files are jacked up. hope that helps!!

  6. #6
    Join Date
    May 2007
    Location
    Europe
    Beans
    280
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Getting mySQL server back on Ubuntu 12.04

    Thank you for the reply worthspending. I tried it the way you suggested but the end result is the same. The log goes below.

    Thank you anyway.


    Code:
    $ sudo rm -r /usr/lib/mysql
    $ sudo rm -r /usr/sbin/mysqld
    $ sudo rm -r /usr/share/mysql
    $ sudo rm -r /usr/bin/mysqlrepair
    $ sudo rm -r /usr/bin/mysql_config
    $ sudo rm -r /usr/bin/mysqldumpslow
    $ sudo rm -r /usr/bin/mysqlbug
    $ sudo rm -r /usr/bin/mysql_plugin
    $ sudo rm -r /usr/bin/mysqlslap
    $ sudo rm -r /usr/bin/mysqlcheck
    $ sudo rm -r /usr/bin/mysqlshow
    $ sudo rm -r /usr/bin/mysqldump
    $ sudo rm -r /usr/bin/mysqlaccess
    $ sudo rm -r /usr/bin/mysqlanalyze
    $ sudo rm -r /usr/bin/mysql_install_db
    $ sudo rm -r /usr/bin/mysqladmin
    $ sudo rm -r /usr/bin/mysql_find_rows
    $ sudo rm -r /usr/bin/mysql_upgrade
    $ sudo rm -r /usr/bin/mysqlreport
    $ sudo rm -r /usr/bin/mysql_fix_extensions
    $ sudo rm -r /usr/bin/mysql_client_test
    $ sudo rm -r /usr/bin/mysql
    $ sudo rm -r /usr/bin/mysqlimport
    $ sudo rm -r /usr/bin/mysql-workbench
    $ sudo rm -r /usr/bin/mysqloptimize
    $ sudo rm -r /usr/bin/mysql_waitpid
    $ sudo rm -r /usr/include/mysql
    
    $ sudo apt-get remove apparmor
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    The following packages will be REMOVED:
      apparmor apparmor-utils
    0 upgraded, 0 newly installed, 2 to remove and 21 not upgraded.
    After this operation, 1,607 kB disk space will be freed.
    Do you want to continue [Y/n]? Y
    (Reading database ... 413043 files and directories currently installed.)
    Removing apparmor-utils ...
    Removing apparmor ...
     * Clearing AppArmor profiles cache                                                                                                                                             [ OK ] 
    All profile caches have been cleared, but no profiles have been unloaded.
    Unloading profiles will leave already running processes permanently
    unconfined, which can lead to unexpected situations.
    
    To set a process to complain mode, use the command line tool
    'aa-complain'. To really tear down all profiles, run the init script
    with the 'teardown' option."
    Processing triggers for man-db ...
    Processing triggers for ureadahead ...
    ureadahead will be reprofiled on next reboot
    
    desousa@CRTE-LDS-15461:~$ 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-server-5.5
    Suggested packages:
      tinyca
    The following NEW packages will be installed:
      mysql-server mysql-server-5.5
    0 upgraded, 2 newly installed, 0 to remove and 21 not upgraded.
    Need to get 0 B/8,828 kB of archives.
    After this operation, 32.8 MB of additional disk space will be used.
    Do you want to continue [Y/n]? Y
    Preconfiguring packages ...
    (Reading database ... 412972 files and directories currently installed.)
    Unpacking mysql-server-5.5 (from .../mysql-server-5.5_5.5.22-0ubuntu1_amd64.deb) ...
    dpkg: error processing /var/cache/apt/archives/mysql-server-5.5_5.5.22-0ubuntu1_amd64.deb (--unpack):
     trying to overwrite '/usr/lib/mysql/plugin/ha_example.so', which is also in package libmysqlclient-dev 5.5.23-1~dotdeb.0
    Selecting previously unselected package mysql-server.
    Unpacking mysql-server (from .../mysql-server_5.5.22-0ubuntu1_all.deb) ...
    Processing triggers for ureadahead ...
    Processing triggers for man-db ...
    Errors were encountered while processing:
     /var/cache/apt/archives/mysql-server-5.5_5.5.22-0ubuntu1_amd64.deb
    E: Sub-process /usr/bin/dpkg returned an error code (1)

  7. #7
    Join Date
    May 2007
    Location
    Europe
    Beans
    280
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Getting mySQL server back on Ubuntu 12.04

    At AskUbuntu this is being diagnosed as a conflict with package(s) installed from dotdeb.org. Indeed I had PHP installed from there, but no clear way how to fix it yet.

    Code:
    $ sudo cat /etc/apt/sources.list | grep dotdeb.org 
    # deb php53.dotdeb.org stable all # disabled on upgrade to precise 
    # deb-src php53.dotdeb.org stable all # disabled on upgrade to precise 
    
    $ sudo aptitude search "?installed?origin(dotdeb.org)" 
    
    $ sudo aptitude search "?installed?origin(php53.dotdeb.org)"
    Any more clues welcome.

  8. #8
    Join Date
    May 2007
    Location
    Europe
    Beans
    280
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Getting mySQL server back on Ubuntu 12.04

    Today I downloaded the rpm from the mySQL website and tried to install it directly with alien. The result is essentially the same:

    Code:
    $ sudo alien -i MySQL-server-5.5.25-1.linux2.6.x86_64.rpm --scripts
    	dpkg --no-force-overwrite -i mysql-server_5.5.25-2_amd64.deb
    Selecting previously unselected package mysql-server.
    (Reading database ... 409708 files and directories currently installed.)
    Unpacking mysql-server (from mysql-server_5.5.25-2_amd64.deb) ...
    dpkg: error processing mysql-server_5.5.25-2_amd64.deb (--install):
     trying to overwrite '/usr/sbin/mysqld', which is also in package mysql-server-core-5.5 5.5.24-0ubuntu0.12.04.1
    dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
    Errors were encountered while processing:
     mysql-server_5.5.25-2_amd64.deb
    Unable to install at /usr/share/perl5/Alien/Package/Deb.pm line 92, <GETPERMS> line 192.
    	find MySQL-server-5.5.25 -type d -exec chmod 755 {} ;
    	rm -rf MySQL-server-5.5.25
    The message is still quite cryptic and I don't see here any complain about dotdeb.org.

    Shouldn't this be filed as a bug?

  9. #9
    Join Date
    May 2007
    Location
    Europe
    Beans
    280
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Getting mySQL server back on Ubuntu 12.04

    Finally I managed to install mysql server using the -f argument in the apt-get command:

    Code:
    apt-get install -f mysql-server
    Thanks to a tip at AskUbuntu.

  10. #10
    Join Date
    Jul 2012
    Beans
    1

    Unhappy Re: Getting mySQL server back on Ubuntu 12.04

    Quote Originally Posted by lads View Post
    Finally I managed to install mysql server using the -f argument in the apt-get command:

    Code:
    apt-get install -f mysql-server
    Thanks to a tip at AskUbuntu.
    i've tried your method but it didn't work either :
    root@linux:~# apt-get install -f mysql-server
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    mysql-server is already the newest version.
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
    2 not fully installed or removed.
    After this operation, 0 B of additional disk space will be used.
    Do you want to continue [Y/n]? y
    Setting up mysql-server-5.5 (5.5.24-0ubuntu0.12.04.1) ...
    start: Job failed to start
    invoke-rc.d: initscript mysql, action "start" failed.
    dpkg: error processing mysql-server-5.5 (--configure):
    subprocess installed post-installation script returned error exit status 1
    dpkg: dependency problems prevent configuration of mysql-server:
    mysql-server depends on mysql-server-5.5; however:
    Package mysql-server-5.5 is not configured yet.
    dpkg: error processing 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-server-5.5
    mysql-server
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    Please help me

Page 1 of 4 123 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •