Installing MySQL from Community Repository

One of the things that I often see experienced DBAs struggle with despite years of experience is MySQL installation in Linux. This is especially when installing from shell (Linux). This quick guide is intended to easen the pain of such installations and hopefully make everything straightforward. To begin with, log on to the server as a non-root user to reduce chances of overwriting a folder that you don’t have permissions on. Execute the folllowing commands thereafter:

#Change to the correct mysql version that you wish to install

  1. yum install -y http://dev.mysql.com/get/mysql57-community-release-el7-9.noarch.rpm
  2. yum makecache -y
  3. yum install -y mysql-community-server mysql-devel mysql

And that is it. 3 simple commands that are straight forward but yet enough to cause endless headache, especially because the default MariaDb gets installed by defaul in Linux, if not correctly done. Cheers folks!!