To reinstall MySQL v5.x on Linux, you can follow these steps:
- Stop the MySQL service:
sudo systemctl stop mysqld
- Remove the existing MySQL installation:
sudo yum remove mysql
- Remove the MySQL data directory:
sudo rm -rf /var/lib/mysql
- Download the MySQL repository package:
wget https://repo.mysql.com/mysql57-community-release-el7-11.noarch.rpm
- Install the MySQL repository package:
sudo yum localinstall mysql57-community-release-el7-11.noarch.rpm
- Install MySQL:
sudo yum install mysql-community-server
- Start the MySQL service:
sudo systemctl start mysqld
- Configure the MySQL root password:
sudo mysql_secure_installation
These steps will reinstall MySQL v5.x on your Linux system and configure the root password for the MySQL service. Make sure to replace the version numbers and file paths with the appropriate values for your system.