适合第一次安装者,在CenterOS7环境下安装。
连接EC2并进入root
1-创建EC2实例
创建实例选择安全群组:Networking->Change Security Groups
安全群组应该具备的入站规则:
SSH; HTTP; HTTPS; MYSQL/Aurora
2-root [1]
# Linux
sudo passwd root
su root
安装MySQL Server
3-安装
3.1-CenterOS7环境安装[2]
# Linux
wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm
rpm -ivh mysql-community-release-el7-5.noarch.rpm
3.2-安装MySQL [3]
# Linux
yum install mysql mysql-server mysql libs
# Linux
systemctl start mysql
3.3-得到并修改临时密码 [5]
# Linux
sudo grep 'temporary password' /var/log/mysqld.log
mysql_secure_installation
Remove anonymous users? (Press y|Y for Yes, any other key for No) : y
Disallow root login remotely? (Press y|Y for Yes, any other key