Install MySQL 8 on Ubuntu/Debian

To install MySQL 8 on Ubuntu/Debian, download the .deb repository file from

https://dev.mysql.com/downloads/repo/apt/

Following link may change, so always get newer version download link from above url.

wget https://dev.mysql.com/get/mysql-apt-config_0.8.24-1_all.deb
dpkg -i mysql-apt-config_0.8.24-1_all.deb

It ask you to select MySQL version, default is 8, just press down arrow and select “Ok”.

Now you are ready to install MySQL 8, you need to run apt update before you can install.

apt update
apt install mysql-server

It ask you to enter password.

Next it ask you to select password format.

MySQL 8 have a different authentication plugin, that use more secure password format. You can select Legacy Authentication for compatibility with MySQL version 5.x

Changing MySQL version

if you want to install differnt MySQL version, uninstall current MySQL version, then select a differnt MySQL version by running

dpkg-reconfigure  mysql-apt-config

MySQL 8 apt Error The following signatures were invalid
mysql

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *