Installing the MySQL server

As mentioned previously, we will install the MySQL server in the same EC2 instance. You can also use an RDS instance from AWS, which is what Amazon recommends for MySQL databases. RDS has many advantages, but to keep things short, we will install MySQL in the same VM instance. Make sure that a shell is open on the instance, as explained earlier, and execute the following commands:

Commands

Description

sudo yum install mysql-server -y

Installs MySQL

sudo chkconfig mysqld on

Activates the MySQL service

sudo service mysqld start

Starts the MySQL service

mysqladmin -u root password [your_new_pwd]

Sets the password

mysqladmin -u root -p create course_management

Creates course_management ...

Get Java EE 8 Development with Eclipse now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.