RedHat Linux
Find out which Red Hat Version of Linux you are using with this command
lsb_release -i -r
and download the specific rpm file from https://dev.mysql.com/downloads/repo/yum/
Now, install the downloaded rpm using yum
sudo yum localinstall downloaded_rpm_file
The above command will create .repo file in /etc/yum.repos.d/ that will add mysql specific repositories which will be used when you in the next step
sudo yum install mysql-community-server
sudo service mysqld start
Ubuntu
- Install mysql server and mysql client
- Set up username and password
- get mysql prompt as user root
sudo apt-get install mysql-server mysql-client
sudo mysqladmin -u root -h localhost
mysql -u root -p