MySQL Snap ships the minimal set of binaries needed for the MySQL server and client.
Install the snap:
If you are an Ubuntu user, snapd is pre-installed and ready to go on all recent Ubuntu releases. Simply click on the drop-down menu at the upper right-hand corner of this page, select your channel of choice (e.g. 8.4/edge), and paste the command in your terminal, e.g.:
sudo snap install mysql
Use the snap:
By default, the MySQL root user is authenticated using the auth_socket plugin, similar to the deb version in the Ubuntu package repository. Therefore, to log as the root MySQL user, you need to prefix the mysql command with sudo.
Snaps are applications packaged with all their dependencies to run on all popular Linux distributions from a single build. They update automatically and roll back gracefully.
Snaps are discoverable and installable from the Snap Store, an app store with an audience of millions.
Enable snapd
On Debian 9 (Stretch) and newer, snap can be installed directly from the command line:
sudo apt update
sudo apt install snapd
After this, install the snapd snap in order to get the latest snapd:
sudo snap install snapd
Install MySQL
To install MySQL, simply use the following command: