The problem
Debian's repository does not have the MySQL version that we need.
The solution
This will update the sql server and local tooling.
If we already have mysql-apt-config
, we run the command dpkg-reconfigure mysql-apt-config
with a root user or with the sudo command. If not, we install it.
Installing mysql-apt-config
Go to https://dev.mysql.com/downloads/repo/apt/ and download the file
as instructed there.
In the following instructions I assume the file is called mysql-apt-config_0.8.15-1_all.deb
.
Verify the md5sum of the file we just downloaded. Compare the output of md5sum ~/Downloads/mysql-apt-config_0.8.15-1_all.deb
with the md5 checksum listed on the linked page on the download page. At the time of writing it links to https://dev.mysql.com/doc/mysql/en/verifying-package-integrity.html. I like to use a scripting language to compare the two. If they don't match it could indicate a corrupted download or a corrupted file on the server. Don't proceed to install the file; another possibility is that it may have been adjusted to contain malware.
Running mysql-apt-config
We can open the file with dpkg
.
It will allow us to configure which MySQL version we want.
dpgk
is part of the Debian package management system.
sudo dpkg -i ~/Downloads/mysql-apt-config_0.8.15-1_all.deb
.
We see a text that explains the process,
and a list with some options.
In my case I am configuring a standard server, so I select
the option "MySQL Server & Cluster".
We can walk to the desired option with the up/down keys,
and select the option with the enter key.
We submit the selected option by choosing
Installing the selected version
With a root user or the sudo command, we run apt update
and apt upgrade
to install the latest packages, including the ones we just configured.
Finalizing
There is one last command to run. I know that the command runs checks and upgrades for the system database and all other databases, but it probably does more than that. We run mysql_upgrade -u root
with a root user or with the sudo command. Here we use root, but we can use whichever database user we normally use to administer this database server.
Now we are finished!