Ubuntu Linux: Install MySQL Server Version 5

To install MySQL Server version 5 on an Ubuntu Linux system, you can use the following steps:

  1. Update the package index:
sudo apt update
  1. Install the MySQL Server package:
sudo apt install mysql-server-5.7
  1. After the installation is complete, run the MySQL secure installation script to secure your MySQL installation:
sudo mysql_secure_installation

The script will prompt you to set a root password, remove anonymous users, disallow root login remotely, and remove the test database.

  1. Start the MySQL service:
sudo systemctl start mysql
  1. Enable the MySQL service to start automatically at boot time:
sudo systemctl enable mysql
  1. Verify that the MySQL service is running:
sudo systemctl status mysql

You should see the status active (running) in the output.

After completing these steps, you should have a fully functional MySQL Server version 5 installation on your Ubuntu Linux system. You can now start using MySQL to manage your databases and data.

Note that the above steps will install the latest version of MySQL Server 5.7 that is available in the default Ubuntu package repository. If you need to install a specific version of MySQL Server 5, you can consult the MySQL manual for information on how to download and install the desired version.

Leave a Comment