How to install mysql server 5.7 on Ubuntu 16.04 LTS ( Xenial Xerus )

To install MySQL 5.7 on Ubuntu 16.04, follow these steps:

  1. Add the MySQL repository to the system:
wget https://dev.mysql.com/get/mysql-apt-config_0.8.10-1_all.deb
sudo dpkg -i mysql-apt-config_0.8.10-1_all.deb
  1. Update the package list:
sudo apt-get update
  1. Install the MySQL server package:
sudo apt-get install mysql-server-5.7
  1. Start the MySQL service:
sudo systemctl start mysql
  1. Verify the MySQL installation:
mysql -u root -p
  1. Secure the MySQL installation:
sudo mysql_secure_installation
  1. Test the MySQL installation:
mysql -u root -p
mysql> SHOW DATABASES;

This will install and configure MySQL 5.7 on your Ubuntu 16.04 server.

Leave a Comment