Installing MySQL Community Server 8.0 on Ubuntu

Technical Articles

Solution
Application
Content Type
Technical Documentation
Utilities & Services
ft:locale
en-US

  1. In the terminal, change to the directory where you want to download files by executing a command similar to the following:
    cd /tmp
    
    Note:Files in the /tmp directory will automatically be deleted when the computer is restarted.

    Files in the /tmp directory will automatically be deleted when the computer is restarted.

  2. Refer to the following webpage to find and copy the URL for the most recent DEB package for MySQL:
  3. Download the DEB package for MySQL 8.0 by executing a command similar to the following after replacing the URL you retrieved in the previous step:
    wget –c https://dev.mysql.com/get/mysql-apt-config_0.8.18-1_all.deb
    
  4. Add the MySQL apt repository by executing the following command:
    sudo dpkg -i mysql-apt-config_0.8.13-1_all.deb
    
    Note:

    You may need to select the correct MySQL version (8.x.x) to install if it is not already selected. Otherwise choose OK.

  5. Update the list of apt packages with the newest versions by executing the following command:
    sudo apt update
  6. Install MySQL by executing the following command:
    sudo apt install mysql-server
  7. When prompted, set a password for the MySQL root user.

    The installer will exit automatically.

  8. (Optional) Verify the installation was successful by doing the following:
    1. Connect to the mysql> prompt by executing the following command:
      mysql -u root -p
      
    2. When prompted, enter the password you set while installing MySQL to verify the new root user credentials are correct. The mysql> prompt should appear.
    3. Exit the prompt by executing the following command:
      exit
  9. Configure MySQL 8.0 to be compatible with Jamf Pro.

    For instructions, see the Configuring MySQL 8.0 for Jamf Pro article.