Nâng cấp mysql 5.6 lên 5.7 linux

Thẩm quyền giải quyết

Nâng cấp MySQL 5. 6 đến MySQL 5. 7 – CentOS

1. Sao lưu quan trọng cơ sở dữ liệu của bạn trước khi nâng cấp. Tạo bản sao lưu dữ liệu MySQL gốc nếu không bạn có thể mất tất cả dữ liệu của mình

$ mysqldump -v -u root -p --all-databases > /tmp/backups/mysql56_all_databases_dump.`date +%F`.sql  

2. Dừng cơ sở dữ liệu mysql và sao lưu các tệp db

$ systemctl stop mysqld
$ cp /var/lib/mysql /var/lib/mysql56.backup

2. Tải xuống MySQL 5. 7 vòng / phút

$ wget http://repo.mysql.com/mysql57-community-release-el7.rpm -P /tmp/

3. Xóa RPM của cộng đồng MySQL có chứa MySQL 5. 6

$ yum remove mysql-community-release

4. Cài đặt MySQL 5. 7 vòng / phút

$ rpm -ivh /tmp/mysql57-community-release-el7.rpm

5. Cập nhật Kho lưu trữ MySQL lên 5. 7

$ yum update mysql

6. Cho MySQL biết rằng nó đã nhận được bản nâng cấp

# sudo systemctl start mysqld
# sudo systemctl status mysqld
# mysql_upgrade

6. Khởi động lại MySQL sau khi nâng cấp

# sudo systemctl restart mysqld
# sudo systemctl status mysqld
# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.7.22 MySQL Community Server (GPL)
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| sys |
+--------------------+
4 rows in set (0.00 sec)

Quảng cáo

Đánh giá điều này

Chia sẻ cái này

  • Twitter
  • Facebook

Như thế này

Thích Đang tải.

Có liên quan

Chia sẻ qua

Post Views. 4,670

Dear Readers,

In this article, we will see the following MySQL Upgrade from 5. 6 to 5. 7.

Nâng cấp mysql 5.6 lên 5.7 linux

1. Logging to AWS Account

First, we need to AWS Console page by using below link

https. //aws. amazon. com/console/

Click on sign in to Console button.

Nâng cấp mysql 5.6 lên 5.7 linux

Logging to aws account

Login using username & password and click on  sign in .

Nâng cấp mysql 5.6 lên 5.7 linux

Enter to AWS Management Console

We can see the AWS Management Console Dashboard

Nâng cấp mysql 5.6 lên 5.7 linux

Go to Services, under the compute module click EC2 service to open.

Nâng cấp mysql 5.6 lên 5.7 linux

2. Khởi chạy máy chủ MySQL

Go to Services, under the compute module click EC2 service to open.

Nâng cấp mysql 5.6 lên 5.7 linux

We can launch Windows Server by using below link

Launch Linux EC2 Instance

We can see the windows server has been launched successfully

Nâng cấp mysql 5.6 lên 5.7 linux

3. Connect to Linux EC2 Instance Using Putty

We can connect putty by using below link

Connect to MySQL Server Using Putty

1

2

3

login as. ec2-user

Authenticating with public key "imported-openssh-key"

[ec2-user@ip-172-31-41-179 ~]$

4. Switch to root user

1

2

[ec2-user@ip-172-31-41-7 ~]$ sudo su

[root@ip-172-31-41-7 ec2-user]#

5. Install Server updates

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

[root@ip-172-31-41-7 ec2-user]# yum update -y

Đỏ Cập nhật Cơ sở hạ tầng 3 Client Configuration Server 8                                                                                                                  14 kB/s | 3. 5 kB     00. 00

Đỏ Doanh nghiệp Linux 8 for x86_64 - AppStream from RHUI (RPMs)                                                                                                             39 MB/s |  25 MB     00. 00

Đỏ Doanh nghiệp Linux 8 for x86_64 - BaseOS from RHUI (RPMs)                                                                                                                43 MB/s |  26 MB     00. 00

Dependencies resolved.

==============================================================================================================================================================================================================

Gói                                       Kiến trúc                                      Phiên bản                                             Kho lưu trữ                                               Size

==============================================================================================================================================================================================================

Đang cài đặt.

kernel                                        x86_ 64                           4. 18. 0-240. 8. 1. el8_3                                                 rhel-8- . 3baseos-rhui-rpms                             4.3 M

kernel-core                                   x86_ 64                           4. 18. 0-240. 8. 1. el8_3                                        rhel-8-baseos-rhui-rpms                              30 M

nhân-mô-đun                                   x86_64                          4.18.0-240. 8. 1. el8_3                                        rhel-8-baseos-rhui-rpms                              26 M

Upgrading.

NetworkManager                                x86_ 64                           1. 1. 26. 0-12. el8_3                                                      rhel-8- . 4baseos-rhui-rpms                             2.4 M

NetworkManager-libnm                          x86_ 64                           1. 1. 26. 0-12. el8_3                                                      rhel-8- . 8baseos-rhui-rpms                             1.8 M

NetworkManager-team                           x86_ 64                           1. 1. 26. 0-12. el8_3                                                      rhel-8-baseos-rhui-rpms                             142 k

NetworkManager-tui                            x86_ 64                           1. 1. 26. 0-12. el8_3                                                      rhel-8-baseos-rhui-rpms                             320 k

cloud-init                                    noarch                          19. 4-11. el8_3. 1                                                      rhel-8-appstream-rhui-rpms                          945 k

curl                                          x86_ 64                           7. 61. 1-14. el8_3. 1                                                     rhel-8-baseos-rhui-rpms                             353 k

freetype                                      x86_ 64                           2. 9. 1-4. el8_3. 1                                                      rhel-8-baseos-rhui-rpms                             394 k

gnutls                                        x86_ 64                           3. 6. 14-7. el8_3                                                       rhel-8- . 0baseos-rhui-rpms                             1.0 M

thông tin chi tiết-khách hàng                               noarch                 3.1.1-1. el8_3                                                      rhel-8- . 0appstream-rhui-rpms                          1.0 M

iptables-libs                                 x86_ 64                           1. 8. 4-15. el8_3. 3                                                       rhel-8-baseos-rhui-rpms                             106 k

kernel-tools                                  x86_ 64                           4. 18. 0-240. 8. 1. el8_3                                        rhel-8- . 5baseos-rhui-rpms                             4.5 M

nhân-công cụ-libs                    x86_64                          4.18.0-240. 8. 1. el8_3                                                 rhel-8- . 3baseos-rhui-rpms                             4.3 M

kexec-công cụ                                            x86_64                          2.0.20-34. el8_3. 1                                                     rhel-8-baseos-rhui-rpms                             496 k

libcurl                                       x86_ 64                           7. 61. 1-14. el8_3. 1                                                     rhel-8-baseos-rhui-rpms                             299 k

microcode_ctl                                 x86_ 64                           4. 20200609-2. 20201112. 1. el8_3                                         rhel-8- . 6baseos-rhui-rpms                             4.6 M

openssl                                       x86_ 64                           1. 1. 1. 1g-12. el8_3                                                      rhel-8-baseos-rhui-rpms                             707 k

openssl-libs                                   x86_64                          1:1. 1. 1g-12. el8_3                                                      rhel-8- . 5baseos-rhui-rpms                             1.5 M

python3-perf                                  x86_ 64                           4. 18. 0-240. 8. 1. el8_3                                        rhel-8- . 4baseos-rhui-rpms                             4.4 M

qemu-guest-agent                              x86_ 64                           15. 4. 2. 0-34. mô-đun+el8. 3. 0+8829+e7a0a3ea. 1                           rhel-8-appstream-rhui-rpms                          228 k

systemd                                              x86_ 64                   239-41.el8_3.1                                                       rhel-8- . 5baseos-rhui-rpms                             3.5 M

systemd-libs                                  x86_ 64                           239-41. el8_3. 1                                                       rhel-8- . 1baseos-rhui-rpms                             1.1 M

systemd-pam                                   x86_ 64                           239-41. el8_3. 1                                                       rhel-8-baseos-rhui-rpms                             456 k

systemd-udev                                  x86_ 64                           239-41. el8_3. 1                                                       rhel-8- . 3baseos-rhui-rpms                             1.3 M

tuned                                         noarch                          2. 14. 0-3. el8_3. 1                                                      rhel-8-baseos-rhui-rpms                             292 k

Installing dependencies.

linux-firmware                                noarch                          20200619-101. git3890db36. el8_3                                       rhel-8-baseos-rhui-rpms                             101 M

 

Transaction Summary

==============================================================================================================================================================================================================

Install   4 Packages

Nâng cấp  24 Gói

 

Tổng số tải xuống kích thước. 198 M

Downloading Packages.

(1/28): nhân-4. 18. 0-240. 8. 1. el8_3. x86_64. rpm                                                                                                                        15 MB/s . | 4. 3 MB     00. 00

(2/28): kernel-core-4. 18. 0-240. 8. 1. el8_3. x86_64. rpm                                                                                                                              33 MB/s . |  30 MB     00. 00

(3/28). kernel-modules-4. 18. 0-240. 8. 1. el8_3. x86_64. rpm                                                                                                                22 MB/s . |  26 MB     00. 01

(4/28): cloud-init-19. 4-11. el8_3. 1. mái vòm. vòng/phút                                                                                                                                 3. 6 MB/s . 945 kB     00. 00

(5/28). qemu-khách-nhân viên . 2. 0-4.2.0-34. mô-đun+el8. 3. 0+8829+e7a0a3ea. 1. x86_64. rpm                                                                                           1. 9 MB/s . 228 kB     00. 00

(6/28): thông tin chi tiết-khách hàng-3. 1. 1-1. el8_3. mái vòm. vòng/phút                                                                                                                              6. 8 MB/s . 1. 0 MB     00. 00

(7/28): Trình quản lý mạng-nhóm-1. 26. 0-12. el8_3. x86_64. vòng/phút                                                                                                               1. 3 MB/s . 142 kB     00. 00

(8/28): kiểu tự do-2. 9. 1-4. el8_3. 1. x86_64. rpm                                                                                                                                        3. 1 MB/s . 394 kB     00. 00

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Tổng cộng                                                                                                                                                                  64 MB/s | 198 MB     00. 03

Đang chạy giao dịch kiểm tra

Giao dịch kiểm tra đã thành công.

Chạy giao dịch thử nghiệm

Giao dịch thử nghiệm đã thành công.

Đang chạy giao dịch

  Chuẩn bị        .                                                                                                                                                                              1/1

  Đang chạy scriptlet. systemd-lib-239 . el8_3. 1. x86_64-41.el8_3.1.x86_64                                                                                                                                 1/1

  Nâng cấp        . systemd-lib-239 . el8_3. 1. x86_64-41.el8_3.1.x86_64                                                                                                                                1/52

  Đang chạy scriptlet. systemd-lib-239 . el8_3. 1. x86_64-41.el8_3.1.x86_64                                                                                                                                1/52

  Nâng cấp        . gnutl-3. 6. 14-7. el8_3. x86_64                                                                                                                                       2/52

  Nâng cấp        . openssl-lib-1 . :1. 1. 1g-12. el8_3. x86_64                                                                                                                               3/52

  Running scriptlet. openssl-lib-1 . :1. 1. 1g-12. el8_3. x86_64                                                                                                                               3/52

  Nâng cấp        . libcurl-7. 61. 1-14. el8_3. 1. x86_64                                                                                                                                          4/52

  Nâng cấp        . Trình quản lý mạng-libnm-1 . :1. 26. 0-12. el8_3. x86_64                                                                                                                      5/52

  Đang chạy scriptlet. NetworkManager-libnm-1. 1. 26. 0-12. el8_3. x86_64                                                                                                                      5/52

  Nâng cấp        . iptables-lib-1. 8. 4-15. el8_3. 3. x86_64                                                                                                                                       6/52

  Đang chạy scriptlet. systemd-239-41. el8_3. 1. x86_64                                                                                                                                  7/52

  Nâng cấp        . systemd-239-41. el8_3. 1. x86_64                                                                                                                                  7/52

  Đang chạy scriptlet. systemd-239-41. el8_3. 1. x86_64                                                                                                                                  7/52

  Nâng cấp        . systemd-pam-239 . el8_3. 1. x86_64-41.el8_3.1.x86_64                                                                                                                                 8/52

  Đang xác minh        . nhân-mô-đun-4. 18. 0-240. 8. 1. el8_3. x86_64                                                                                                                        1/52

  Đang xác minh        . nhân-nhân-4. 18. 0-240. 8. 1. el8_3. x86_64                                                                                                                               2/52

  Đang xác minh        . nhân-4. 18. 0-240. 8. 1. el8_3. x86_64                                                                                                                                3/52

  Đang xác minh        . linux-phần sụn-20200619 . git3890db36. el8_3. noarch-101.git3890db36.el8_3.noarch                                                                                                                                4/52

  Đang xác minh        . đám mây-init-19. 4-11. el8_3. 1. noarch                                                                                                                                                   5/52

  Đang xác minh        . đám mây-init-19. 4-11. el8. noarch                                                                                                                                                          6/52

  Đang xác minh        . thông tin chi tiết-khách hàng-3. 1. 1-1. el8_3. noarch                                                                                                                                                7/52

  Đang xác minh        . thông tin chi tiết-khách hàng-3. 1. 0-3. el8. noarch                                                                                                                                                  8/52

Đã nâng cấp.

  Trình quản lý mạng-1. 1. 26. 0-12. el8_3. x86_64  Trình quản lý mạng-libnm- . 1:1. 26. 0-12. el8_3. x86_64  Trình quản lý mạng-nhóm- . 1:1. 26. 0-12. el8_3. x86_64                        Trình quản lý mạng-tui- . 1:1. 26. 0-12. el8_3. x86_64

  đám mây-init-19.4-11. el8_3. 1. noarch        cuộn tròn-7. 61. 1-14. el8_3. 1. x86_64                  kiểu tự do-2. 9. 1-4. el8_3. 1. x86_64                                     gnutls-3. 6. 14-7. el8_3. x86_64

  thông tin chi tiết-khách hàng-3.1.1-1. el8_3. noarch     iptables-lib- . 8. 41.8.4-15. el8_3. 3. x86_64          nhân-công cụ- . 18. 04.18.0-240. 8. 1. el8_3. x86_64                            kernel-công cụ- . 18. 0libs-4.18.0-240. 8. 1. el8_3. x86_64

  kexec-công cụ-2.0.20-34. el8_3. 1. x86_64     libcurl-7. 61. 1-14. el8_3. 1. x86_64                       microcode_ctl-4. 20200609-2. 20201112. 1. el8_3. x86_64                  openssl-1. 1. 1. 1g-12. el8_3. x86_64

  openssl-lib-1:1. 1. 1g-12. el8_3. x86_64    python3-perf-4. 18. 0-240. 8. 1. el8_3. x86_64       qemu-khách- . agent-15:4. 2. 0-34. module+el8. 3. 0+8829+e7a0a3ea. 1. x86_64  systemd-239-41. el8_3. 1. x86_64

  systemd-lib-239-41.el8_3.1.x86_64       systemd-pam- . el8_3. 1. x86_64239-41.el8_3.1.x86_64                      systemd-udev- . el8_3. 1. x86_64239-41.el8_3.1.x86_64                                  tuned-2. 14. 0-3. el8_3. 1. nhà thờ

 

Đã cài đặt.

  nhân-4. 18. 0-240. 8. 1. el8_3. x86_64         nhân-nhân- . 18. 04.18.0-240. 8. 1. el8_3. x86_64         nhân-mô-đun- . 18. 04.18.0-240. 8. 1. el8_3. x86_64         linux-chương trình cơ sở- . git3890db36. el8_3. noarch20200619-101.git3890db36.el8_3.noarch

 

Hoàn tất.

6. Cài đặt gói wget

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

[root@ip-172-31-41-7 ec2-user]# yum install wget -y

Siêu dữ liệu cuối cùng hết hạn kiểm tra. 0. 04. 39 trước vào Thứ Hai 28 . Dec 2020 08:06. 57 AM UTC.

Dependencies resolved.

==============================================================================================================================================================================================================

Gói                                   Kiến trúc                                                        Phiên bản                                    Kho lưu trữSize

==============================================================================================================================================================================================================

Đang cài đặt.

wget                                     x86_ 64                             1.19.5-10. el8                                       rhel-8-appstream-rhui-rpms                                     734 k

 

Transaction Summary

==============================================================================================================================================================================================================

Install  1 Package

 

Tổng số tải xuống kích thước. 734 k

Installed size. 2. 8 M

Downloading Packages.

wget-1. 19. 5-10. el8. x86_64. vòng/phút                                                                                                                                                 5. 0 MB/s . 734 kB     00. 00

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Tổng                                                                                                                                                             3. 9 MB/s . 734 kB     00. 00

Đang chạy giao dịch kiểm tra

Giao dịch kiểm tra đã thành công.

Chạy giao dịch thử nghiệm

Giao dịch thử nghiệm đã thành công.

Đang chạy giao dịch

  Chuẩn bị        .                                                                                                                                                                              1/1

  Đang cài đặt       . wget-1. 19. 5-10. el8. x86_64                                                                                                                                          1/1

  Đang chạy scriptlet. wget-1. 19. 5-10. el8. x86_64                                                                                                                                          1/1

  Đang xác minh        . wget-1. 19. 5-10. el8. x86_64                                                                                                                                          1/1

 

Đã cài đặt.

  quên-1. 19. 5-10. el8. x86_64

 

Hoàn tất.

6. Cài đặt MySQL 5. 6

Chúng ta có thể cài đặt MySQL 5. 6 bằng cách sử dụng liên kết dưới đây

Cài đặt MySQL 5. 6

7. Nâng cấp MySQL từ 5. 6 đến 5. 7
Kiểm tra trạng thái của MySQL

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

[root@ip-172-31-41-7 ec2-user]# service mysqld start

Đang chuyển hướng đến /bin/systemctl start mysqld.dịch vụ

[root@ip-172-31-41-7 ec2-user]# service mysqld status

Đang chuyển hướng đến /bin/systemctl status mysqld.dịch vụ

mysqld. dịch vụ - MySQL Cộng đồng Máy chủ

Đã tải. đã tải (/usr/ . lib/systemd/system/mysqld.dịch vụ; đã bật; nhà cung cấp . preset: đã tắt)

Đang hoạt động. hoạt động (đang chạy) kể từ . Mon 2020-12-28 08:22. 56 UTC; 4 giây trước

Quy trình. 58906 ExecStartPost=/usr/bin/mysql-systemd-start post (code=exited, status=0/SUCCESS)

Quy trình. 58846 ExecStartPre=/usr/bin/mysql-systemd-start pre (code=exited, status=0/SUCCESS)

Chính PID. 58905 (mysqld_safe)

Nhiệm vụ. 23 (giới hạn. 4836)

Bộ nhớ. 493. 3M

Nhóm C. /hệ thống. lát/mysqld. dịch vụ

├─ 58905 /bin/sh /usr/bin/mysqld_safe --basedir=/usr

└─ 59080 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --log-error=/var/log/mysqld.log --pid- . =/var/run/mysqld/mysqld.pid --ổ cắm=/var/lib/mysq>

Dừng dịch vụ của MySQL 5. 6

1

2

[root@ip-172-31-41-7 ec2-user]# service mysqld stop

Đang chuyển hướng đến /bin/systemctl stop mysqld.dịch vụ

Kiểm tra trạng thái của MySQL

1

2

3

4

5

6

7

8

9

10

11

12

13

14

[root@ip-172-31-41-7 ec2-user]# service mysqld status

Đang chuyển hướng đến /bin/systemctl status mysqld.dịch vụ

mysqld. dịch vụ - MySQL Cộng đồng Máy chủ

   Đã tải. đã tải (/usr/ . lib/systemd/system/mysqld.dịch vụ; đã bật; nhà cung cấp . preset: đã tắt)

   Đang hoạt động. không hoạt động (đã chết) kể từ . Mon 2020-12-28 08:32. 29 UTC; 2s trước

  Quy trình. 59177 ExecStartPost=/usr/bin/mysql-systemd-start post (code=exited, status=0/SUCCESS)

  Quy trình. 59176 ExecStart=/usr/bin/mysqld_safe --basedir=/usr (code=exited, status=0/SUCCESS)

  Quy trình. 59164 ExecStartPre=/usr/bin/mysql-systemd-start pre (code=exited, status=0/SUCCESS)

Chính PID. 59176 (=đã thoát, status=0/SUCCESS)

 

Tháng 12 28 08. 26. 58 ip-172- . ap31-41-7.ap-nam-1. tính toán. nội bộ systemd[1]. Bắt đầu MySQL Cộng đồng Máy chủ. . .

Tháng 12 28 08. 26. 58 ip-172- . ap31-41-7.ap-nam-1. tính toán. internal mysqld_safe[59176]. 201228 08. 26. 58 mysqld_safe Đăng nhập vào ' . nhật ký'.

Tháng 12 28 08. 26. 58 ip-172- . ap31-41-7.ap-nam-1. tính toán. nội bộ mysqld_safe[59176]. 201228 08. 26. 58 mysqld_safe Bắt đầu mysqld daemonwith databases from /var/lib/mysql

Tháng 12 28 08. 26. 59 ip-172-31-41-7. ap-nam-1. compute. nội bộ systemd[1]. Đã bắt đầu MySQL Cộng đồng Máy chủ.

Sao lưu cơ sở dữ liệu MySQL 5. 6

1

2

3

4

5

6

7

8

9

10

11

12

13

[root@ip-172-31-41-7 ec2-user]# cp -r /var/lib/mysql /tmp

[root@ip-172-31-41-7 ec2-user]# cd /tmp

[root@ip-172-31-41-7 tmp]# ls

mysql  systemd-private-573e2cde6da64d8d896e39e7124b0a7e-chronyd. dịch vụ-qrjFEf

[root@ip-172-31-41-7 tmp]# cd mysql/

[root@ip-172-31-41-7 mysql]# ll

tổng 110604

-rw-r-----. 1 gốc gốc       56< . Dec 28 08:35 tự động. cnf

-rw-r-----. 1 root root 12582912 Dec 28 08. 35 ibdata1

-rw-r-----. 1 root root 50331648 Dec 28 08. 35 ib_logfile0

-rw-r-----. 1 root root 50331648 Dec 28 08. 35 ib_logfile1

drwx------. 2 root root     4096 Dec 28 08. 35 mysql

drwx------. 2 root root     4096 Dec 28 08. 35 performance_schema

Remove Binaries of MySQL 5. 6

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

[root@ip-172-31-41-7 ec2-user]# yum remove mysql-community-server*

Dependencies resolved.

==============================================================================================================================================================================================================

Package                                         Architecture                    Version                                                           Repository                                            Size

==============================================================================================================================================================================================================

Removing.

mysql-community-server                          x86_ 64                           5. 6. 50-2. el7                                                      @mysql56-community                                   268 M

Removing unused dependencies.

libaio                                          x86_ 64                           0. 3. 112-1. el8                                                     @rhel-8-baseos-rhui-rpms                              93 k

mysql-community-client                          x86_ 64                           5. 6. 50-2. el7                                                      @mysql56-community                                    83 M

mysql-community-common                          x86_ 64                           5. 6. 50-2. el7                                                      @mysql56-community                                   2. 3 M

mysql-community-libs                            x86_ 64                           5. 6. 50-2. el7                                                      @mysql56-community                                   9. 1 M

ncurses-compat-libs                             x86_ 64                           6. 1-7. 20180224. el8                                                @rhel-8-baseos-rhui-rpms                             1. 2 M

perl-Carp                                       noarch                          1. 42-396. el8                                                      @rhel-8-baseos-rhui-rpms                              41 k

perl-DBI                                           x86_64                          1.641-3. module+el8. 3. 0+6481+fbe55708                              @rhel-8-appstream-rhui-rpms                          1. 8 M

perl-Data-Dumper                                x86_ 64                           2. 167-399. el8                                                     @rhel-8-baseos-rhui-rpms                             104 k

perl-Digest                                     noarch                          1. 17-395. el8                                                      @rhel-8-appstream-rhui-rpms                           26 k

perl-Digest-MD5                                 x86_ 64                           2. 55-396. el8                                                      @rhel-8-appstream-rhui-rpms                           55 k

perl-Encode                                     x86_ 64                           4. 2. 97-3. el8                                                      @rhel-8-baseos-rhui-rpms                             9. 7 M

perl-Errno                                      x86_64                          1.28-416. el8                                                      @rhel-8-baseos-rhui-rpms                             9. 3 k

perl-Exporter                                   noarch                          5. 72-396. el8                                                      @rhel-8-baseos-rhui-rpms                              54 k

Transaction Summary

==============================================================================================================================================================================================================

Remove  50 Packages

 

Freed space. 401 M

Is this ok [y/N]. y

Đang chạy giao dịch kiểm tra

Giao dịch kiểm tra đã thành công.

Chạy giao dịch thử nghiệm

Giao dịch thử nghiệm đã thành công.

Đang chạy giao dịch

  Chuẩn bị        .                                                                                                                                                                              1/1

  Running scriptlet. mysql-community-server-5. 6. 50-2. el7. x86_64                                                                                                                                           1/1

  Running scriptlet. mysql-community-server-5. 6. 50-2. el7. x86_64                                                                                                                                          1/50

  Erasing          . mysql-community-server-5. 6. 50-2. el7. x86_64                                                                                                                                          1/50

  Running scriptlet. mysql-community-server-5. 6. 50-2. el7. x86_64                                                                                                                                          1/50

  Erasing          . perl-DBI-1. 641-3. module+el8. 3. 0+6481+fbe55708. x86_ 64                                                                                                                                 2/50

  Erasing          . perl-Math-BigInt-1. 1. 9998. 11-7. el8. noarch                                                                                                                                           3/50

  Erasing          . mysql-cộng đồng-máy khách . 6. 50-5.6.50-2. el7. x86_64                                                                                                                        4/50

  Xóa          . perl-libnet-3. 11-3. el8. noarch                                                                                                                                                       5/50

  Erasing          . perl-URI-1. 73-3. el8. noarch                                                                                                                                                          6/50

  Erasing          . perl-IO-Socket-SSL-2. 066-4. module+el8. 3. 0+6446+594cad75. noarch                                                                                                                      7/50

  Erasing          . perl-HTTP-Tiny-0. 074-1. el8. noarch                                                                                                                                                   8/50

  Verifying        . libaio-0. 3. 112-1. el8. x86_64                                                                                                                                                         1/50

  Verifying        . mysql-community-client-5. 6. 50-2. el7. x86_64                                                                                                                                          2/50

  Verifying        . mysql-community-common-5. 6. 50-2. el7. x86_64                                                                                                                                          3/50

  Verifying        . mysql-community-libs-5. 6. 50-2. el7. x86_64                                                                                                                                            4/50

  Verifying        . mysql-cộng đồng-máy chủ . 6. 50-5.6.50-2. el7. x86_64                                                                                                                                          5/50

  Verifying        . ncurses-compat-libs-6. 1-7. 20180224. el8. x86_64                                                                                                                                       6/50

  Verifying        . perl-Carp-1. 42-396. el8. noarch                                                                                                                                                       7/50

  Verifying        . perl-DBI-1. 641-3. module+el8. 3. 0+6481+fbe55708. x86_ 64                                                                                                                                 8/50

Removed.

  libaio-0. 3. 112-1. el8. x86_64                                          mysql-community-client-5. 6. 50-2. el7. x86_64                       mysql-community-common-5. 6. 50-2. el7. x86_64

  mysql-community-libs-5. 6. 50-2. el7. x86_64                             mysql-community-server-5. 6. 50-2. el7. x86_64                       ncurses-compat-libs-6. 1-7. 20180224. el8. x86_64

  perl-Carp-1. 42-396. el8. noarch                                        perl-DBI-1. 641-3. module+el8. 3. 0+6481+fbe55708. x86_64             perl-Data-Dumper-2. 167-399. el8. x86_64

  perl-Digest-1. 17-395. el8. noarch                                      perl-Digest-MD5-2. 55-396. el8. x86_64                              perl-Encode-4. 2. 97-3. el8. x86_64

  perl-Errno-1. 28-416. el8. x86_64                                       perl-Nhà xuất- . 725.72-396. el8. noarch                                perl-File-Path-2. 15-2. el8. noarch

  perl-File-Temp-0. 230. 600-1. el8. noarch                                perl-Getopt-Long-1. 2. 50-4. el8. noarch                             perl-HTTP-Tiny-0. 074-1. el8. noarch

  perl-IO-1. 38-416. el8. x86_64                                          perl-IO-Socket-IP-0. 39-5. el8. noarch                              perl-IO-Socket-SSL-2. 066-4. module+el8. 3. 0+6446+594cad75. noarch

  perl-MIME-Base64-3. 15-396. el8. x86_64                                 perl-Math-BigInt-1. 1. 9998. 11-7. el8. noarch                        perl-Math-Complex-1. 59-416. el8. noarch

  perl-Mozilla-CA-20160104-7. module+el8. 3. 0+6498+9eecfe51. noarch       perl-Net-SSLeay-1. 88-1. module+el8. 3. 0+6446+594cad75. x86_64       perl-PathTools-3. 74-1. el8. x86_64

  perl-Pod-Escapes-1. 1. 07-395. el8. noarch                               perl-Pod-Perldoc-3. 28-396. el8. noarch                             perl-Pod-Simple-1. 3. 35-395. el8. noarch

  perl-Pod-Usage-4. 1. 69-395. el8. noarch                                 perl-Scalar-List-Utils-3. 1. 49-2. el8. x86_64                       perl-Socket-4. 2. 027-3. el8. x86_64

  perl-Storable-1. 3. 11-3. el8. x86_64                                    perl-Term-ANSIColor-4. 06-396. el8. noarch                          perl-Term-Cap-1. 17-395. el8. noarch

  perl-Text-ParseWords-3. 30-395. el8. noarch                             perl-Text-Tabs+Wrap-2013. 0523-395. el8. noarch                     perl-Time-Local-1. 1. 280-1. el8. noarch

  perl-URI-1. 73-3. el8. noarch                                           perl-Unicode-Normalize-1. 25-396. el8. x86_64                       perl-hằng số- . 331.33-396. el8. nhà thờ

  perl-interpreter-4. 5. 26. 3-416. el8. x86_64                             perl-libnet- . 113.11-3. el8. noarch                                    perl-libs-4. 5. 26. 3-416. el8. x86_64

  perl-macros-4. 5. 26. 3-416. el8. x86_64                                  perl-parent-1. 0. 237-1. el8. noarch                                 perl-podlators-4. 11-1. el8. noarch

  perl-threads-1. 2. 21-2. el8. x86_64                                     perl-threads-shared-1. 58-2. el8. x86_64

 

Hoàn tất.

Download Binaries of MySQL 5. 7 (RPM)

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

[root@ip-172-31-41-7 ec2-user]# wget https. //dev. mysql. com/get/mysql57-community-release-el7-9. noarch. rpm

--2020-12-28 08. 38. 59--  https. //dev. mysql. com/get/mysql57-community-release-el7-9. noarch. rpm

Đang giải quyết dev. mysql. com (dev. mysql. com). . . 137. 254. 60. 11

Connecting to dev. mysql. com (dev. mysql. com). 137. 254. 60. 11. . 443. connected.

HTTP request sent, awaiting response. . . 302 Found

Location. https. //repo. mysql. com//mysql57-community-release-el7-9. noarch. rpm [following]

--2020-12-28 08. 39. 00--  https. //repo. mysql. com//mysql57-community-release-el7-9. noarch. rpm

Resolving repo. mysql. com (repo. mysql. com). . . 104. 120. 171. 24

Connecting to repo. mysql. com (repo. mysql. com). 104. 120. 171. 24. . 443. connected.

HTTP request sent, awaiting response. . . 200 OK

Length. 9224 (9. 0K) [application/x-redhat-package-manager]

Saving to. mysql57-community-release-el7-9. noarch. rpm

 

mysql57-community-release-el7-9. noarch. rpm          100%[=================================================================================================================>]   9. 01K  --. -KB/s    in 0s

 

2020-12-28 08. 39. 00 (193 MB/s) - mysql57-community-release-el7-9. noarch. rpm saved [9224/9224]

 

[root@ip-172-31-41-7 ec2-user]# ll

total 20

-rw-r--r--. 1 root root 9224 Sep 12  2016 mysql57-community-release-el7-9. noarch. rpm

-rw-r--r--. 1 root root 6140 Nov 12  2015 mysql-community-release-el7-5. noarch. rpm

Install Binareis of MySQL 5. 7 (RPM)

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

[root@ip-172-31-41-7 ec2-user]# yum localinstall mysql57-community-release-el7-9. noarch. rpm --allowerasing

Last metadata expiration check. 0. 23. 49 ago on Mon 28 Dec 2020 08. 18. 00 AM UTC.

Dependencies resolved.

==============================================================================================================================================================================================================

Package                                                       Architecture                               Version                                      Repository                                        Size

==============================================================================================================================================================================================================

Đang cài đặt.

mysql57-community-release                                     noarch                                     el7-9                                        @commandline                                     9. 0 k

Removing dependent packages.

mysql-community-release                                       noarch                                     el7-5                                        @System                                          4. 3 k

 

Transaction Summary

==============================================================================================================================================================================================================

Install  1 Package

Remove   1 Package

 

Total size. 9. 0 k

Is this ok [y/N]. y

Downloading Packages.

Đang chạy giao dịch kiểm tra

Giao dịch kiểm tra đã thành công.

Chạy giao dịch thử nghiệm

Giao dịch thử nghiệm đã thành công.

Đang chạy giao dịch

  Chuẩn bị        .                                                                                                                                                                              1/1

  Installing       . mysql57-community-release-el7-9. noarch                                                                                                                                               1/2

  Erasing          . mysql-community-release-el7-5. noarch                                                                                                                                                 2/2

  Verifying        . mysql57-community-release-el7-9. noarch                                                                                                                                               1/2

  Verifying        . mysql-community-release-el7-5. noarch                                                                                                                                                 2/2

 

Đã cài đặt.

  mysql57-community-release-el7-9. noarch

 

Hoàn tất.

Install MySQL 5. 7

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

[root@ip-172-31-41-7 ec2-user]# yum -y install mysql-community-server

MySQL 5. 7 Community Server                                                                                                                                                    9. 5 MB/s . 2. 0 MB     00. 00

Last metadata expiration check. 0. 00. 01 ago on Mon 28 Dec 2020 08. 42. 27 AM UTC.

Dependencies resolved.

==============================================================================================================================================================================================================

Package                                         Architecture                    Version                                                            Repository                                           Size

==============================================================================================================================================================================================================

Đang cài đặt.

mysql-community-server                          x86_ 64                           5. 7. 32-1. el7                                                       mysql57-community                                   173 M

Installing dependencies.

libaio                                          x86_ 64                           0. 3. 112-1. el8                                                      rhel-8-baseos-rhui-rpms                              33 k

mysql-community-client                          x86_ 64                           5. 7. 32-1. el7                                                       mysql57-community                                    25 M

mysql-community-common                          x86_ 64                           5. 7. 32-1. el7                                                       mysql57-community                                   308 k

mysql-community-libs                            x86_ 64                           5. 7. 32-1. el7                                                       mysql57-community                                   2. 3 M

ncurses-compat-libs                             x86_ 64                           6. 1-7. 20180224. el8                                                 rhel-8-baseos-rhui-rpms                             331 k

perl-Carp                                       noarch                          1. 42-396. el8                                                       rhel-8-baseos-rhui-rpms                              30 k

perl-Data-Dumper                                x86_ 64                           2. 167-399. el8                                                      rhel-8-baseos-rhui-rpms                              58 k

perl-Digest                                     noarch                          1. 17-395. el8                                                       rhel-8-appstream-rhui-rpms                           27 k

perl-Digest-MD5                                 x86_ 64                           2. 55-396. el8                                                       rhel-8-appstream-rhui-rpms                           37 k

perl-Encode                                     x86_ 64                           4. 2. 97-3. el8                                                       rhel-8- . 5baseos-rhui-rpms                             1.5 M

perl-Errno                                      x86_ 64                           1. 28-416. el8                                                       rhel-8-baseos-rhui-rpms                              76 k

perl-Exporter                                   noarch                          5. 72-396. el8                                                       rhel-8-baseos-rhui-rpms                              34 k

perl-File-Path                                  noarch                          2. 15-2. el8                                                         rhel-8-baseos-rhui-rpms                              38 k

perl-File-Temp                                  noarch                          0. 230. 600-1. el8                                                    rhel-8-baseos-rhui-rpms                              63 k

perl-Getopt-Long                                noarch                          1. 2. 50-4. el8                                                       rhel-8-baseos-rhui-rpms                              63 k

perl-HTTP-Tiny                                  noarch                          0. 074-1. el8                                                        rhel-8-baseos-rhui-rpms                              58 k

Transaction Summary

==============================================================================================================================================================================================================

Install  47 Packages

 

Total download size. 214 M

Installed size. 912 M

Downloading Packages.

(1/47). mysql-community-common-5. 7. 32-1. el7. x86_64. rpm                                                                                                                        2. 7 MB/s . 308 kB     00. 00

(2/47). mysql-community-libs-5. 7. 32-1. el7. x86_64. rpm                                                                                                                           11 MB/s . 2. 3 MB     00. 00

(3/47). perl-Mozilla-CA-20160104-7. module+el8. 3. 0+6498+9eecfe51. noarch. rpm                                                                                                    136 kB/s .   15 kB     00. 00

(4/47). perl-URI-1. 73-3. el8. noarch. rpm                                                                                                                                        1. 0 MB/s . 116 kB     00. 00

(5/47). perl-Net-SSLeay-1. 88-1. module+el8. 3. 0+6446+594cad75. x86_64. rpm                                                                                                        3. 1 MB/s . 379 kB     00. 00

(6/47). perl-Digest-1. 17-395. el8. noarch. rpm                                                                                                                                   277 kB/s .   27 kB     00. 00

(7/47). mysql-community-client-5. 7. 32-1. el7. x86_64. rpm                                                                                                                         35 MB/s .   25 MB     00. 00

(8/47). perl-Digest-MD5-2. 55-396. el8. x86_64. rpm                                                                                                                               245 kB/s .   37 kB     00. 00

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Total                                                                                                                                                                          68 MB/s . 214 MB     00. 03

warning. /var/cache/dnf/mysql57-community-65b9ecb4cc6a2553/packages/mysql-community-client-5. 7. 32-1. el7. x86_64. rpm. Header V3 DSA/SHA1 Signature, key ID 5072e1f5. NOKEY

MySQL 5. 7 Community Server                                                                                                                                                    5. 7 MB/s . 5. 8 kB     00. 00

Importing GPG key 0x5072E1F5.

Userid     . "MySQL Release Engineering

Fingerprint. A4A9 4068 76FC BD3C 4567 70C8 8C71 8D3B 5072 E1F5

From       . /etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

Key imported successfully

Đang chạy giao dịch kiểm tra

Giao dịch kiểm tra đã thành công.

Chạy giao dịch thử nghiệm

Giao dịch thử nghiệm đã thành công.

Đang chạy giao dịch

  Chuẩn bị        .                                                                                                                                                                              1/1

  Installing       . perl-libs-4. 5. 26. 3-416. el8. x86_64                                                                                                                                                   1/47

  Installing       . perl-Exporter-5. 72-396. el8. noarch                                                                                                                                                   2/47

  Installing       . perl-Carp-1. 42-396. el8. noarch                                                                                                                                                       3/47

  Installing       . perl-Scalar-List-Utils-3. 1. 49-2. el8. x86_64                                                                                                                                          4/47

  Installing       . perl-parent-1. 0. 237-1. el8. noarch                                                                                                                                                    5/47

  Installing       . perl-Text-ParseWords-3. 30-395. el8. noarch                                                                                                                                            6/47

  Installing       . mysql-community-common-5. 7. 32-1. el7. x86_64                                                                                                                                          7/47

  Installing       . mysql-community-libs-5. 7. 32-1. el7. x86_64                                                                                                                                            8/47

  Đang chạy scriptlet. mysql-community-libs-5. 7. 32-1. el7. x86_64                                                                                                                                            8/47

  Verifying        . mysql-community-client-5. 7. 32-1. el7. x86_64                                                                                                                                          1/47

  Verifying        . mysql-community-common-5. 7. 32-1. el7. x86_64                                                                                                                                          2/47

  Verifying        . mysql-community-libs-5. 7. 32-1. el7. x86_64                                                                                                                                            3/47

  Verifying        . mysql-community-server-5. 7. 32-1. el7. x86_64                                                                                                                                          4/47

  Verifying        . perl-Mozilla-CA-20160104-7. module+el8. 3. 0+6498+9eecfe51. noarch                                                                                                                      5/47

  Verifying        . perl-URI-1. 73-3. el8. noarch                                                                                                                                                          6/47

  Verifying        . perl-Net-SSLeay-1. 88-1. mô-đun+el8. 3. 0+6446+594cad75. x86_64                                                                                                                          7/47

  Verifying        . perl-Digest-1. 17-395. el8. noarch                                                                                                                                                     8/47

Đã cài đặt.

  libaio-0. 3. 112-1. el8. x86_64                                               mysql-cộng đồng- . 7. 32client-5.7.32-1. el7. x86_64                                 mysql-cộng đồng- . 7. 32common-5.7.32-1. el7. x86_64

  mysql-cộng đồng-libs-5.7.32-1. el7. x86_64                                    mysql-cộng đồng- . 7. 32server-5.7.32-1. el7. x86_64                                ncurses-compat-libs-6. 1-7. 20180224. el8. x86_64

  perl-Carp-1. 42-396. el8. noarch                                             perl-Data-Dumper-2. 167-399. el8. x86_64                                     perl-Digest-1. 17-395. el8. noarch

  perl-Digest-MD5-2. 55-396. el8. x86_64                                       perl-Encode-4. 2. 97-3. el8. x86_64                                           perl-Errno-1. 28-416. el8. x86_64

  perl-Exporter-5. 72-396. el8. noarch                                         perl-File-Path-2. 15-2. el8. noarch                                          perl-File-Temp-0. 230. 600-1. el8. noarch

  perl-Getopt-Long-1. 2. 50-4. el8. noarch                                      perl-HTTP-Tiny-0. 074-1. el8. noarch                                         perl-IO-1. 38-416. el8. x86_64

  perl-IO-Socket-IP-0. 39-5. el8. noarch                                       perl-IO-Socket-SSL-2. 066-4. module+el8. 3. 0+6446+594cad75. noarch            perl-MIME-Base64-3. 15-396. el8. x86_64

  perl-Mozilla-CA-20160104-7. module+el8. 3. 0+6498+9eecfe51. noarch            perl-Net-SSLeay-1. 88-1. module+el8. 3. 0+6446+594cad75. x86_64                perl-PathTools-3. 74-1. el8. x86_64

  perl-Pod-Escapes-1. 1. 07-395. el8. noarch                                    perl-Pod-Perldoc-3. 28-396. el8. noarch                                      perl-Pod-Simple-1. 3. 35-395. el8. noarch

  perl-Pod-Usage-4. 1. 69-395. el8. noarch                                      perl-Scalar-List-Utils-3. 1. 49-2. el8. x86_64                                perl-Socket-4. 2. 027-3. el8. x86_64

  perl-Storable-1. 3. 11-3. el8. x86_64                                         perl-Term-ANSIColor-4. 06-396. el8. noarch                                   perl-Term-Cap-1. 17-395. el8. noarch

  perl-Text-ParseWords-3. 30-395. el8. noarch                                  perl-Text-Tabs+Wrap-2013. 0523-395. el8. noarch                              perl-Time-Local-1. 1. 280-1. el8. noarch

  perl-URI-1. 73-3. el8. noarch                                                perl-Unicode-Normalize-1. 25-396. el8. x86_64                                perl-constant-1. 33-396. el8. noarch

  perl-interpreter-4. 5. 26. 3-416. el8. x86_64                                  perl-libnet-3. 11-3. el8. noarch                                             perl-libs-4. 5. 26. 3-416. el8. x86_64

  perl-macros-4. 5. 26. 3-416. el8. x86_64                                       perl-parent-1. 0. 237-1. el8. noarch                                          perl-podlators-4. 11-1. el8. noarch

  perl-threads-1. 2. 21-2. el8. x86_64                                          perl-threads-shared-1. 58-2. el8. x86_64

 

Hoàn tất.

Check Version of MySQL

1

2

[root@ip-172-31-41-7 ec2-user]# mysql -V

mysql  Ver 14. 14 Distrib 5. 7. 32, for Linux (x86_64) using  EditLine wrapper

Start the Service of MySQL

1

2

[root@ip-172-31-41-7 ec2-user]# service mysqld start

Đang chuyển hướng đến /bin/systemctl start mysqld.dịch vụ

Kiểm tra trạng thái của MySQL

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

[root@ip-172-31-40-179 ec2-user]# service mysqld status

Đang chuyển hướng đến /bin/systemctl status mysqld.dịch vụ

mysqld. service - MySQL Server

   Đã tải. đã tải (/usr/ . lib/systemd/system/mysqld.dịch vụ; đã bật; nhà cung cấp . preset: đã tắt)

   Active. active (running) since Tue 2020-12-29 12. 03. 34 UTC; 21s ago

     Docs. man. mysqld(8)

           http. //dev. mysql. com/doc/refman/en/using-systemd. html

  Process. 66842 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld. pid $MYSQLD_OPTS (code=exited, status=0/SUCCESS)

  Process. 66783 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)

Main PID. 66845 (mysqld)

    Tasks. 27 (limit. 4836)

   Memory. 233. 8M

   Nhóm C. /hệ thống. lát/mysqld. dịch vụ

           └─ 66845 /usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid

 

Tháng 12 29 12. 03. 29 ip-172-31-40-179. ap-south-1. compute. internal systemd[1]. Starting MySQL Server. . .

Dec 29 12. 03. 34 ip-172-31-40-179. ap-south-1. compute. internal systemd[1]. Started MySQL Server.

Connect to MySQL 5. 7 Database 

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

[root@ip-172-31-41-7 ec2-user]# mysql -u root -p

Enter password.

Welcome to the MySQL monitor.   Commands end with ; or \g.

Your MySQL connection id is 3

Server version. 5. 7. 32 MySQL Community Server (GPL)

 

Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.

 

Oracle is a registered trademark of Oracle Corporation and/or its

affiliates. Other names may be trademarks of their respective

owners.

 

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

 

mysql>

Check the version of MySQL 5. 7 Database

1

2

3

4

5

6

7

8

9

10

mysql> select @@version;

+-----------+

. @@version .

+-----------+

. 5. 7. 32    .

+-----------+

1 row in set (0. 00 sec)

 

mysql> exit

ByE

Upgrading the MySQL 5. 7 Database

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

[root@ip-172-31-41-7 ec2-user]# mysql_upgrade -u root -p

Enter password.

Checking if update is needed.

Checking server version.

Running queries to upgrade MySQL server.

Checking system database.

mysql. columns_priv OK

mysql. db OK

mysql. engine_cost OK

mysql. event OK

mysql. func OK

mysql. general_log OK

mysql. gtid_executed OK

mysql. help_category OK

mysql. help_keyword OK

mysql. help_relation OK

mysql. help_topic OK

mysql. innodb_index_stats OK

mysql. innodb_table_stats OK

mysql. ndb_binlog_index OK

mysql. plugin OK

mysql. proc OK

mysql. procs_priv OK

mysql. proxies_priv OK

mysql. server_cost OK

mysql. servers OK

mysql. slave_master_info OK

mysql. slave_relay_log_info OK

mysql. slave_worker_info OK

mysql. slow_log OK

mysql. tables_priv OK

mysql. time_zone OK

mysql. time_zone_leap_second OK

mysql. time_zone_name OK

mysql. time_zone_transition OK

mysql. time_zone_transition_type OK

mysql. user OK

Upgrading the sys schema.

Checking databases.

sys. sys_config OK

Upgrade process completed successfully.

Checking if update is needed.

Setting the root Password 

This command enables you to improve the security of your MySQL installation in the following ways
👉 You can set a password for root accounts
👉 You can remove root accounts that are accessible from outside the local host
👉 You can remove anonymous-user accounts
👉 You can remove the test database, which by default can be accessed by anonymous users

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

[root@ip-172-31-41-7 ec2-user]# mysql_secure_installation

 

Securing the MySQL server deployment.

 

Enter password for user root.

 

VALIDATE PASSWORD PLUGIN can be used to test passwords

and improve security. It checks the strength of password

and allows the users to set only those passwords which are

secure enough. Would you like to setup VALIDATE PASSWORD plugin?

 

Press y. Y for Yes, any other key for No.

Using existing password for root.

Change the password for root ? ((Press y. Y for Yes, any other key for No) .

 

. . . skipping.

By default, a MySQL installation has an anonymous user,

allowing anyone to log into MySQL without having to have

a user account created for them. This is intended only for

testing, and to make the installation go a bit smoother.

You should remove them before moving into a production

environment.

 

Remove anonymous users? (Press y. Y for Yes, any other key for No) . y

Success.

 

 

Normally, root should only be allowed to connect from

'localhost'. This ensures that someone cannot guess at

the root password from the network.

 

Disallow root login remotely? (Press y. Y for Yes, any other key for No) . y

Success.

 

By default, MySQL comes with a database named 'test' that

anyone can access. This is also intended only for testing,

and should be removed before moving into a production

environment.

 

 

Remove test database and access to it? (Press y. Y for Yes, any other key for No) . y

- Dropping test database. . .

Success.

 

- Removing privileges on test database. . .

Success.

 

Reloading the privilege tables will ensure that all changes

made so far will take effect immediately.

 

Reload privilege tables now? (Press y. Y for Yes, any other key for No) . y

Success.

Connect to MySQL 5. 7 Database 

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

[root@ip-172-31-41-7 ec2-user]# mysql -u root -p

Enter password.

Welcome to the MySQL monitor.   Commands end with ; or \g.

Your MySQL connection id is 3

Server version. 5. 7. 32 MySQL Community Server (GPL)

 

Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.

 

Oracle is a registered trademark of Oracle Corporation and/or its

affiliates. Other names may be trademarks of their respective

owners.

 

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

 

mysql>

Check the version of MySQL 5. 7 Database

1

2

3

4

5

6

7

8

9

10

mysql> select @@version;

+-----------+

. @@version .

+-----------+

. 5. 7. 32    .

+-----------+

1 row in set (0. 00 sec)

 

mysql> exit

Bye

Thank you for giving your valuable time to read the above information. Please click here to subscribe for further updates

How to upgrade MySQL version in Linux?

Step 1. Launch the Terminal. Obtain your SSH credentials and use the ssh command to log in. Step 3. Now upgrade MySQL. It'll prompt you to choose a version; select 5. 7 or 8. 0 .

How to upgrade MySQL 5. 5 to 5. 7 Centos 7?

Upgrade mysql from 5. 5 to 5. 7 Centos 7, Linux. .
STEP 1. Dừng máy chủ MySQL #sudo dịch vụ mysqld dừng
Step 2. Download the Package of the MySQL 5. 7 to upgrade #wget https. //dev. mysql. com/get/Downloads/MySQL-5. 7/mysql-5. 7. 27-1. el7. x86_64. rpm-bundle. tar. .
Step 3. So, now we will upgrade the extracted package

How to upgrade MySQL 5. 6 to 8. 0 in Centos 7?

MySQL Upgrade from 5. 6 to 5. 7 to 8. 0 .
Launch MySQL Server. Go to Services, under the compute module click EC2 service to open. .
Connect to Linux EC2 Instance Using Putty. We can connect putty by using below link. .
Switch to root user. .
Install Server updates. .
Install wget package. .
Install MySQL 5. 6. .
Upgrade MySQL from 5. 6 to 5. 7

Which is faster 5. 6 or 5. 7 MySQL?

MySQL 5. 7 is 3x faster than MySQL 5. 6 , phân phối 1. 6 triệu truy vấn SQL mỗi giây.