Failure to install MySQL 8.0 on Ubuntu 18.04

8,838

I am leaving this question, even though the solution was found here, as this was a clean install of 8.0 vs. an upgrade from 5.7. I note again that that .deb package was definitely putting 5.7 pieces in, and not 8.0. Here is the actual contents of /etc/apt/sources.list.d/mysql.list that worked:

deb http://repo.mysql.com/apt/ubuntu/ bionic mysql-apt-config
deb http://repo.mysql.com/apt/ubuntu/ bionic mysql-8.0
deb http://repo.mysql.com/apt/ubuntu/ bionic mysql-tools
#deb http://repo.mysql.com/apt/ubuntu/ bionic mysql-tools-preview
deb-src http://repo.mysql.com/apt/ubuntu/ bionic mysql-8.0

a quick apt update and then apt install mysql-server and I had 8.0 successfully installed.

Share:
8,838

Related videos on Youtube

Oliver Williams
Author by

Oliver Williams

Updated on September 18, 2022

Comments

  • Oliver Williams
    Oliver Williams over 1 year

    I'm at the state of frustration trying to install MySQL 8.0 on my Ubuntu 18.04 box. I have searched and see many answers (and also a lot of posts about failures) but nothing is working.

    I start by the following:

    wget https://dev.mysql.com/get/mysql-apt-config_0.8.13-1_all.deb
    

    And then this:

    dpkg -i mysql-apt-config_0.8.13-1_all.deb
    

    On checking my apt package I see a new file created, /etc/apt/sources.list.d/mysql.list, but the content can't possibly be right for 8.0! - content here:

    ### THIS FILE IS AUTOMATICALLY CONFIGURED ###
    # You may comment out entries below, but any other modifications may be lost.
    # Use command 'dpkg-reconfigure mysql-apt-config' as root for modifications.
    deb http://repo.mysql.com/apt/ubuntu/ bionic mysql-apt-config
    # deb http://repo.mysql.com/apt/ubuntu/ bionic mysql-5.7
    deb http://repo.mysql.com/apt/ubuntu/ bionic mysql-tools
    #deb http://repo.mysql.com/apt/ubuntu/ bionic mysql-tools-preview
    # deb-src http://repo.mysql.com/apt/ubuntu/ bionic mysql-5.7
    

    Anyway, next step is this:

    dpkg -i mysql-apt-config_0.8.13-1_all.deb
    

    This give me a UI which looks correct:

    first step of dpkg

    Leading to this selection:

    second step of dpkg

    When I select OK on THIS option, I am sent back to the first screenshot. Then that takes me to the 2nd. I am now in an infinite loop. When I hit escape, I get the following message:

    Warning: apt-key should not be used in scripts (called from postinst maintainerscript of the package mysql-apt-config)
    

    At this point, I don't know what further steps to take. My thoughts are, is there any way to install MySQL 8.0 directly without apt-get? I am appreciative of any and all solutions here, thanks.

    • Kulfy
      Kulfy almost 5 years
      Select OK option (4th one) and then select OK (the one in the Middleton and bottom) in the first screen.
    • Oliver Williams
      Oliver Williams almost 5 years
      No combination of choices escapes the loop - only way out was to install 5.7 which I didn't want to do.
    • user535733
      user535733 almost 5 years
      The config and UI issue seems like a bug. Please file a bug report with the MySQL developers who developed that config package you downloaded.
    • Oliver Williams
      Oliver Williams almost 5 years
      As many times as I'm running through things and documenting them, I'll be able to catch it on my next server and file the report. Thanks @user535733 for the suggestion