How To Install MySQL
Hello Everyone
Welcome to CloudAffaire and this is Debjeet.
In this blog post, we will discuss how to install MySQL in different operating systems on Cloud platforms like AWS, GCP, or Azure. MySQL installation process changes based on OS and not Cloud service providers. Hence the installation process given for one Cloud service provider for a particular OS will also work in other cloud service providers.
What Is MySQL:
MySQL is an open-source relational database management system (RDBMS), a relational database organizes data into one or more data tables in which data types may be related to each other; these relations help structure the data. MySQL is free and open-source software under the terms of the GNU General Public License and is also available under a variety of proprietary licenses.
How To Install MySQL On AWS EC2 Instance With RHEL or CentOS or Oracle Linux Version 7 AMI:
Step 1: Create an EC2 instance with any RHEL 7 based AMI.
Step 2: Connect to your EC2 instance and update the OS packages.
1 2 3 4 5 6 7 8 9 10 |
########################## ## How To Install MYSQL ## ########################## ##----------------------------------------- ## RHEL | CentOS | Oracle Linyx : Version 7 ##----------------------------------------- ## Update your OS packages sudo yum update -y |
Step 3: Install MySQL On AWS EC2 Instance.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
## Get mysql community edition 8.0 repository wget https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm ## Install the yum repository for mysql sudo rpm -ivh mysql80-community-release-el7-3.noarch.rpm && rm mysql80-community-release-el7-3.noarch.rpm ## Install mysql server version 8.0 sudo yum install -y mysql-server ## Start and enable mysql service sudo systemctl start mysqld sudo systemctl enable mysqld sudo systemctl status mysqld ## Get root user password sudo grep 'temporary password' /var/log/mysqld.log ## Connect to mysql server mysql -uroot -p ## Reset root user password ALTER USER 'root'@'localhost' IDENTIFIED BY ' |
How To Install MySQL On Google Compute Engine VM Instance With Ubuntu 18 Image:
Step 1: Create a Google Compute Engine VM instance with Ubuntu 18 Image.
Step 2: Connect to your Compute Engine VM instance.
Step 3: Install MySQL On Google Compute Engine VM Instance.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
##-------------------- ## Ubuntu : Version 18 ##-------------------- ## Get mysql community edition 8.0 repository wget -c https://repo.mysql.com/mysql-apt-config_0.8.15-1_all.deb ## Install mysql repository sudo dpkg -i mysql-apt-config_0.8.15-1_all.deb && rm mysql-apt-config_0.8.15-1_all.deb ## Update your OS packages sudo apt-get update ## Install mysql server version 8.0 sudo apt-get install -y mysql-server ## Enter mysql root password when prompted ## Enable autometic start of mysql service during start up sudo systemctl enable mysql sudo systemctl start mysql sudo systemctl status mysql ## Connect to mysql server mysql -uroot -p |
How To Install MySQL On Azure VM Instance With Windows Server 2019 Image.
Step 1: Create An Azure VM Instance With Windows Server 2019 Image.
Step 2: Log in to your Azure VM Instance And Download MySQL Version 8 using below link.
https://dev.mysql.com/downloads/file/?id=499590
Step 3: Double click on the downloaded installer package and click “Run”.
Step 4: Follow the installation wizard (Select Type as full and set the root user password) and complete the installation.
Step 5: Once the installation is completed, start MySQL shell or workbench and connect to the MySQL server.
How To Install MySQL On Alibaba Cloud ECS Instance With Debian Image:
Step 1: Create an Alibaba Cloud EC2 instance with Debian 10 Image.
Step 2: Connect to your ECS instance.
Step 3: Install MySQL On Alibaba Cloud ECS Instance.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
##------------ ## Debian : 10 ##------------ ## Get mysql community edition 8.0 repository wget -c https://repo.mysql.com/mysql-apt-config_0.8.15-1_all.deb ## Install mysql repository sudo dpkg -i mysql-apt-config_0.8.15-1_all.deb && rm mysql-apt-config_0.8.15-1_all.deb ## Update your OS packages sudo apt-get update ## Install mysql server version 8.0 sudo apt-get install -y mysql-server ## Enter mysql root password when prompted ## Enable autometic start of mysql service during start up sudo systemctl enable mysql sudo systemctl start mysql sudo systemctl status mysql ## Connect to mysql server mysql -uroot -p |
How To Install MySQL On SUSE Linux
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
##-------- ## SUSE 12 ##-------- ## Get mysql community edition 8.0 repository wget -c https://repo.mysql.com/mysql80-community-release-sles12-3.noarch.rpm ## Install mysql repository sudo rpm -Uvh mysql80-community-release-sles12-3.noarch.rpm && rm mysql80-community-release-sles12-3.noarch.rpm ## Import MySQL GnuPG Key sudo rpm --import /etc/RPM-GPG-KEY-mysql ## enable the specific version sudo zypper modifyrepo -e mysql80-community ## Install mysql server version 8.0 sudo zypper install mysql-community-server ## Enable autometic start of mysql service during start up sudo systemctl enable mysql sudo systemctl enable mysql sudo systemctl start mysql ## Get root user password sudo grep 'temporary password' /var/log/mysql/mysqld.log ## Connect to mysql server mysql -uroot -p ## Reset root user password ALTER USER 'root'@'localhost' IDENTIFIED BY ' |
Hope you have enjoyed this blog post. Please refer to MySQL documentation for more detail.
https://dev.mysql.com/doc/refman/8.0/en/installing.html