-
Notifications
You must be signed in to change notification settings - Fork 1
/
log_rr_before_promotion.txt
106 lines (91 loc) · 4.46 KB
/
log_rr_before_promotion.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
chongtingho ~
$ chmod 400 replicakeypair.pem
chongtingho ~
$ ssh -i "replicakeypair.pem" [email protected]
__| __|_ )
_| ( / Amazon Linux 2 AMI
___|\___|___|
https://aws.amazon.com/amazon-linux-2/
4 package(s) needed for security, out of 8 available
Run "sudo yum update" to apply all updates.
-bash: warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory
[ec2-user@ip-9-1-11-22 ~]$ sudo su -
[root@ip-9-1-11-22 ~]# yum install mysql
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
amzn2-core | 3.7 kB 00:00:00
Resolving Dependencies
--> Running transaction check
---> Package mariadb.x86_64 1:5.5.64-1.amzn2 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
==================================================================================================================================================
Package Arch Version Repository Size
==================================================================================================================================================
Installing:
mariadb x86_64 1:5.5.64-1.amzn2 amzn2-core 9.0 M
Transaction Summary
==================================================================================================================================================
Install 1 Package
Total download size: 9.0 M
Installed size: 49 M
Is this ok [y/d/N]: y
Downloading packages:
mariadb-5.5.64-1.amzn2.x86_64.rpm | 9.0 MB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : 1:mariadb-5.5.64-1.amzn2.x86_64 1/1
Verifying : 1:mariadb-5.5.64-1.amzn2.x86_64 1/1
Installed:
mariadb.x86_64 1:5.5.64-1.amzn2
Complete!
[root@ip-9-1-11-22 ~]# exit
logout
[ec2-user@ip-9-1-11-22 ~]$ mysql -h dbreadreplica.cm1su1zmfdzp.us-west-1.rds.amazonaws.com -P 3306 -u admin -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MySQL connection id is 423
Server version: 8.0.17 Source distribution
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MySQL [(none)]> SHOW DATABASES;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| udacity |
+--------------------+
4 rows in set (0.01 sec)
MySQL [(none)]> USE udacity
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
MySQL [udacity]> DESCRIBE pet
-> \c
MySQL [udacity]> DESCRIBE pet;
+---------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+---------+-------------+------+-----+---------+-------+
| name | varchar(20) | YES | | NULL | |
| owner | varchar(20) | YES | | NULL | |
| species | varchar(20) | YES | | NULL | |
| sex | char(1) | YES | | NULL | |
| birth | date | YES | | NULL | |
| death | date | YES | | NULL | |
+---------+-------------+------+-----+---------+-------+
6 rows in set (0.01 sec)
MySQL [udacity]> INSERT INTO pet
-> VALUES ('Mocha','Brian','dog','f','1992-04-27',NULL);
ERROR 1290 (HY000): The MySQL server is running with the --read-only option so it cannot execute this statement
MySQL [udacity]> SELECT * FROM pet;
+----------+-------+---------+------+------------+-------+
| name | owner | species | sex | birth | death |
+----------+-------+---------+------+------------+-------+
| Puffball | Diane | hamster | f | 1999-03-30 | NULL |
| Mochi | Sukey | rabbit | f | 1992-12-17 | NULL |
+----------+-------+---------+------+------------+-------+
2 rows in set (0.01 sec)
MySQL [udacity]>