Installing MySQL

For anyone who is not familiar with installing MySQL on Amazon Linux, you can use the following steps to install it:

  1. Download the MySQL Yum repository as follows:
wget http://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpm
  1. Install the Yum repository file using the following commands:
sudo yum localinstall mysql57-community-release-el7-8.noarch.rpm

This will add the MySQL Yum repository to our system's repository list and downloads the GnuPG key to check the integrity of the package we will download.

  1. Install the MySQL community server as follows:
sudo yum install mysql-community-server
  1. Start the MySQL server using this command:
sudo service mysqld start
  1. Get the generated root password from the log file as follows:
sudo grep 'temporary password' /var/log/mysqld.log
  1. Change the root password, as shown here:
mysql –u root –p
mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'k7Ayy$KTCcrM%2F3';
  1. Create a database as follows:
CREATE DATABASE task_agile CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
  1. Create a database user as follows:
CREATE USER 'app_user'@'%' IDENTIFIED BY '12$456!';
GRANT ALL PRIVILEGES ON task_agile . * TO 'app_user'@'%';
FLUSH PRIVILEGES;
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.223.196.146