In This Blog We are going to Install Mysql 5.7 On Ubuntu 22.04 and 24.04 LTS.
Step 1: Add MySQL APT Repository and Download Mysql Deb
- sudo apt update
- sudo apt install wget -y
- wget https://dev.mysql.com/get/mysql-apt-config_0.8.12-1_all.deb
- sudo dpkg -i mysql-apt-config_0.8.12-1_all.deb
👉 In the prompt, choose Ubuntu Bionic and click Ok
👉 The next prompt shows MySQL 8.0 chosen by default. Choose the first option and click OK
👉 In the next prompt, select MySQL 5.7 server and click OK.
👉 The next prompt selects MySQL5.7 by default. Choose the last option Ok and click OK
Step 2: Update MySQL Repository.
- sudo apt-get update
⚠️ Note :- If you will receive Error of Public Key then execute below command with replace of updated public key which is shown in the error.
- sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys public-Key
- sudo apt-get update
- sudo apt-cache policy mysql-server
Step 3: Install MySQL 5.7
- sudo apt install -f mysql-client=5.7* mysql-community-server=5.7* mysql-server=5.7*
ERROR: If You will get the below dependencies error then only follow the Step no 4
The error occurs because libaio1 and libtinfo5 are not directly available in Ubuntu 24.04's repositories.
Step 4: Install Compatibility Libraries:
⚠️ Note :- If below link doesn't work then download it manually.
Download libaio1:
- wget http://archive.ubuntu.com/ubuntu/pool/main/liba/libaio/libaio1_0.3.112-5_amd64.deb
- sudo dpkg -i libaio1_0.3.112-5_amd64.deb
Download libtinfo5:
- wget http://archive.ubuntu.com/ubuntu/pool/main/n/ncurses/libtinfo5_6.0+20160213-1ubuntu1_amd64.deb
- sudo dpkg -i libtinfo5_6.0+20160213-1ubuntu1_amd64.deb
Again Run Below Command:
- sudo apt update
- sudo apt install -f mysql-client=5.7* mysql-community-server=5.7* mysql-server=5.7*
👉 Enter and re-enter root password:
Step 5: Check MySQL 5.7 version
mysql --version
Related Articles:
No comments:
Post a Comment
testing