Deploying mysql (unfinished) and awsredhat on aws (redhat)
Let's just talk about the code.
------------------------------------------ Split line -------------------------------------------------------------
[Root @ ip-172-31-9-121] # yum install mysql
[Root @ ip-172-31-9-121] # yum install mysql-server
Tips: if the following code appears, you need to download the mysql-server rpm package,
Loaded plugins: amazon-id, rhui-lb, search-disabled-repos
No package mysql-server available.
[Root @ ip-172-31-9-121 homt] # rpm-Uvh http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
[Root @ ip-172-31-9-121 homt] # yum install mysql-devel
Then modify the permission:
[Root @ ip-172-31-9-121 homt] # chgrp-R mysql/var/lib/mysql
[Root @ ip-172-31-9-121 homt] # chmod-R 770/var/lib/mysql
Start the mysql service:
[Root @ ip-172-31-9-121 homt] # service mysqld start
Set mysql password
[Root @ ip-172-31-9-121 homt] #/usr/bin/mysql-u root password '123'
Test whether mysql is successfully installed (enter a password to verify that the installation is successful ):
[Root @ ip-172-31-9-121 homt] # mysql