mysql -u -p -e "status;"
[root@ip-172-31-23-110 yum.repos.d]# mysql -u scm -pscm -e "status;"
mysql Ver 15.1 Distrib 5.5.60-MariaDB, for Linux (x86_64) using readline 5.1
Connection id: 3
Current database:
Current user: scm@localhost
SSL: Not in use
Current pager: stdout
Using outfile: ''
Using delimiter: ;
Server: MariaDB
Server version: 5.5.60-MariaDB MariaDB Server
Protocol version: 10
Connection: Localhost via UNIX socket
Server characterset: latin1
Db characterset: latin1
Client characterset: utf8
Conn. characterset: utf8
UNIX socket: /var/lib/mysql/mysql.sock
Uptime: 20 min 0 sec
Threads: 1 Questions: 11 Slow queries: 0 Opens: 0 Flush tables: 2 Open tables: 26 Queries per second avg: 0.009
mysql -u -p -e "show databases;"
[root@ip-172-31-23-110 yum.repos.d]# mysql -u scm -pscm -e "show databases;"
+--------------------+
| Database |
+--------------------+
| information_schema |
| scm |
| test |
+--------------------+
Challenge 1: Install a MySQL/MariaDB server
mariadb repo [mariadb] name = MariaDB-5.5.39 baseurl=http://yum.mariadb.org/5.5/rhel7-amd64/ gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB gpgcheck=1
install maria db yum install MariaDB-server
install mysql-jdbc mkdir -p /usr/share/java/ wget https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.1.46.tar.gz cp mysql-connector-java-5.1.46-bin.jar /usr/share/java/mysql-connector-java.jar
hostname -f ip-172-31-23-110.us-east-2.compute.internal
mysql -u -p -e "status;"
[root@ip-172-31-23-110 yum.repos.d]# mysql -u scm -pscm -e "status;"
mysql Ver 15.1 Distrib 5.5.60-MariaDB, for Linux (x86_64) using readline 5.1
Connection id: 3 Current database:
Current user: scm@localhost SSL: Not in use Current pager: stdout Using outfile: '' Using delimiter: ; Server: MariaDB Server version: 5.5.60-MariaDB MariaDB Server Protocol version: 10 Connection: Localhost via UNIX socket Server characterset: latin1 Db characterset: latin1 Client characterset: utf8 Conn. characterset: utf8 UNIX socket: /var/lib/mysql/mysql.sock Uptime: 20 min 0 sec
Threads: 1 Questions: 11 Slow queries: 0 Opens: 0 Flush tables: 2 Open tables: 26 Queries per second avg: 0.009