[AWS] How to develop Temporary Web System ~Part6: Install MySQL~

First of all

In my last article, I’ve introduced how to install nginx and PHP to EC2 instance. In this article, let’s install MySQL.

System Requirement
  • Web site can be accessed on the Internet with FQDN
  • Basic LAMP environment (Linux, Nginx, PHP, MySQL)
  • No redundant configuration and backup
System Configuration

System Configuration diagram is as below. Public Users access Web site through Route53 with FQDN. On the other hand, Administrator access to Web site via Internet Gateway.

Install MySQL

Firstly, access to EC2 instance and becomes root user. And, install repository for MySQL.

Check if there are repositories for mysql, mysql-community.repo and mysql-community-source.repo.

Next, install “mysql-community-server” by yum command.

If “Complete!” message is displayed, it may be installed successfully.
But, please check if mysql is installed properly by the below command.

It’s OK !!
Next, enable auto start setting by below command.

Then, start mysql and check its status.

OK, MysSQL server is successfully started.
Next, check the password of MySQL. In MySQL, default root password is set at random.

And, access mysql server and input password that you checked.
If “mysql>” is displayed, you successfully log in to MySQL database.

If you want, you can change MySQL login password as below.

In this chapter, I do not explain how to use MySQL database because it depends on your application. But we’ve prepared to use it for now.

This is the end of part6, PHP installation, and completed temporary web site server development. I hope you could enjoy your development and continue your tech life.