1
00:00:04,150 --> 00:00:09,700
In the previous long lecture, I have prepared the all commands that I will use to start those three

2
00:00:09,700 --> 00:00:10,450
containers.

3
00:00:10,450 --> 00:00:14,530
And first of all, let's create a new custom network using First command.

4
00:00:14,530 --> 00:00:16,870
This one Docker network, create WordPress.

5
00:00:16,900 --> 00:00:18,130
Let me copy it.

6
00:00:18,220 --> 00:00:20,050
I'll use Ctrl, C, Ctrl v.

7
00:00:20,080 --> 00:00:25,000
No need to enter all commands manually and let's create a new network here.

8
00:00:25,240 --> 00:00:34,570
Network was created, let's inspect it, Docker network, inspect WordPress and here we subnet that

9
00:00:34,570 --> 00:00:38,860
will be used for containers in this custom WordPress network.

10
00:00:38,890 --> 00:00:39,490
Great.

11
00:00:39,490 --> 00:00:41,710
Let's proceed and let's take next command.

12
00:00:41,710 --> 00:00:44,920
This one that will start MySQL server.

13
00:00:44,950 --> 00:00:46,240
Let me copy it.

14
00:00:46,270 --> 00:00:48,550
Go to terminal paste it.

15
00:00:49,870 --> 00:00:55,000
Here is ID of container that will be running MySQL 5.7.

16
00:00:55,030 --> 00:00:56,780
Let's go back to VS code.

17
00:00:56,800 --> 00:01:00,010
Let's take next command that will start WordPress.

18
00:01:00,040 --> 00:01:01,240
Let me copy it.

19
00:01:01,630 --> 00:01:03,140
Go back to terminal.

20
00:01:03,160 --> 00:01:04,030
Paste.

21
00:01:04,840 --> 00:01:07,390
Here is of WordPress container.

22
00:01:07,390 --> 00:01:11,200
And finally, let's start phpMyAdmin container.

23
00:01:11,500 --> 00:01:12,940
Copy this command.

24
00:01:14,070 --> 00:01:16,260
Go to terminal and paste it here.

25
00:01:16,500 --> 00:01:17,280
Enter.

26
00:01:17,280 --> 00:01:21,390
And here I see id of phpMyAdmin container.

27
00:01:21,420 --> 00:01:30,000
Let's verify whether all containers are now running Docker PS and yes, I see those three containers

28
00:01:30,000 --> 00:01:33,600
and you see here port mapping for phpMyAdmin container.

29
00:01:33,600 --> 00:01:36,240
Its name custom name phpMyAdmin.

30
00:01:36,270 --> 00:01:39,150
Also you see port mapping for WordPress container.

31
00:01:39,150 --> 00:01:44,730
And here you see custom name for WordPress container and custom name for MySQL container as well.

32
00:01:44,760 --> 00:01:52,470
Notice that we don't need to have any port mapping for MySQL container because WordPress and phpMyAdmin

33
00:01:52,470 --> 00:01:59,190
container will communicate with MySQL container internally in the internal custom WordPress network.

34
00:01:59,220 --> 00:02:03,510
There is no need to expose MySQL database to external world.

35
00:02:03,540 --> 00:02:04,140
Great.

36
00:02:04,140 --> 00:02:06,390
Let's now verify connectivity to WordPress.

37
00:02:06,420 --> 00:02:07,920
Let's go to Google Chrome.

38
00:02:08,070 --> 00:02:10,110
I don't need those steps anymore.

39
00:02:10,110 --> 00:02:12,990
And here let's remove this part.

40
00:02:12,990 --> 00:02:20,170
And now recap that WordPress is running at port 8080 and phpMyAdmin is running at port 8081.

41
00:02:20,200 --> 00:02:20,560
Great.

42
00:02:20,560 --> 00:02:23,320
Let's press enter now and here I see.

43
00:02:23,320 --> 00:02:26,930
Welcome page for WordPress Initial configuration dialog.

44
00:02:26,950 --> 00:02:28,390
Let's select language.

45
00:02:28,390 --> 00:02:29,350
It is English.

46
00:02:29,380 --> 00:02:30,490
Click continue.

47
00:02:30,490 --> 00:02:35,300
And now I'm prompted to enter database name, username, password and host.

48
00:02:35,320 --> 00:02:36,250
Let's go.

49
00:02:37,090 --> 00:02:44,500
Database name WordPress Recap that we have set up all those parameters here in this section in those

50
00:02:44,500 --> 00:02:46,720
environment variables, WordPress everywhere.

51
00:02:46,720 --> 00:02:49,570
So let's enter those parameters here.

52
00:02:49,600 --> 00:02:57,350
WordPress is database name, WordPress is username and password is also WordPress.

53
00:02:57,370 --> 00:03:03,730
Here I don't need to use root password, I'll use username and password for specific database wordpress

54
00:03:03,730 --> 00:03:05,230
and database host.

55
00:03:05,260 --> 00:03:07,870
You may guess will be MySQL.

56
00:03:07,900 --> 00:03:11,980
It's a name of container that is running MySQL.

57
00:03:12,100 --> 00:03:12,730
Great.

58
00:03:12,730 --> 00:03:16,120
Let's fingers crossed and let's press submit.

59
00:03:17,580 --> 00:03:20,760
And I see error establishing a database connection.

60
00:03:21,090 --> 00:03:21,990
Sorry, guys.

61
00:03:21,990 --> 00:03:23,910
I failed at my first attempt.

62
00:03:23,940 --> 00:03:27,210
Let me find out what is the reason for this error.

63
00:03:27,240 --> 00:03:34,860
Let me first try to go to terminal and let me have a look at the logs of MySQL server.

64
00:03:35,040 --> 00:03:38,440
Let me have a look at them using MySQL.

65
00:03:38,460 --> 00:03:39,960
Name of the container.

66
00:03:39,960 --> 00:03:41,050
Let me clear terminal.

67
00:03:41,070 --> 00:03:43,770
Docker logs MySQL.

68
00:03:45,110 --> 00:03:49,040
And here you see access denied for user WordPress at.

69
00:03:49,160 --> 00:03:53,540
And here is address seems to me address of WordPress container.

70
00:03:53,570 --> 00:03:57,720
All right, let me go to vs code and verify username here.

71
00:03:57,740 --> 00:04:00,350
WordPress WordPress database.

72
00:04:00,350 --> 00:04:01,130
WordPress.

73
00:04:01,160 --> 00:04:02,570
It seems all is good.

74
00:04:03,470 --> 00:04:07,630
Let me go to MySQL Docker Hub Web page.

75
00:04:07,640 --> 00:04:08,720
This one.

76
00:04:09,770 --> 00:04:14,120
And check whether I have correctly entered all environment variables.

77
00:04:14,270 --> 00:04:16,279
Let me scroll down a bit.

78
00:04:17,970 --> 00:04:19,079
All right.

79
00:04:22,780 --> 00:04:23,650
Environment variables.

80
00:04:23,650 --> 00:04:28,870
So MySQL database, MySQL user and MySQL password.

81
00:04:28,870 --> 00:04:32,950
It seems I have entered MySQL username instead of user.

82
00:04:33,100 --> 00:04:35,350
Yeah, sorry for that guys.

83
00:04:35,350 --> 00:04:39,580
So here must be user and it will be equal to wordpress.

84
00:04:39,730 --> 00:04:40,180
Great.

85
00:04:40,180 --> 00:04:44,500
Let me save this configuration and let me go back to terminal.

86
00:04:44,680 --> 00:04:45,580
Clear it.

87
00:04:45,580 --> 00:04:51,810
And now I need to stop and remove MySQL container and then run it over again.

88
00:04:51,820 --> 00:04:57,790
So Docker PS Docker stop MySQL.

89
00:04:59,330 --> 00:05:01,880
Docker rm MySQL.

90
00:05:01,910 --> 00:05:05,210
I need to remove it because I'll reuse its name MySQL.

91
00:05:05,240 --> 00:05:08,300
Otherwise I'll get duplicate name error.

92
00:05:08,300 --> 00:05:09,680
So removed.

93
00:05:09,680 --> 00:05:12,800
And now let me go back to this command.

94
00:05:12,950 --> 00:05:13,970
Copy it.

95
00:05:14,510 --> 00:05:16,610
Run MySQL container.

96
00:05:16,970 --> 00:05:19,220
Go back to terminal paste here.

97
00:05:20,360 --> 00:05:22,430
All right, here is the ID of this container.

98
00:05:22,460 --> 00:05:30,830
Now let's go back to WordPress web page and try to initialize connection to MySQL server again.

99
00:05:31,100 --> 00:05:33,730
So localhost 88 English.

100
00:05:33,740 --> 00:05:35,030
Let's continue.

101
00:05:35,300 --> 00:05:39,230
And now let's again enter database name, username, password and host.

102
00:05:39,260 --> 00:05:40,160
Let's go.

103
00:05:40,370 --> 00:05:42,200
Database name is wordpress.

104
00:05:42,200 --> 00:05:43,010
Let me copy it.

105
00:05:43,010 --> 00:05:45,680
Username is the same as database name.

106
00:05:45,680 --> 00:05:46,250
WordPress.

107
00:05:46,250 --> 00:05:51,890
Password is also WordPress and database host is MySQL like this.

108
00:05:51,920 --> 00:05:53,810
And let's submit.

109
00:05:54,520 --> 00:05:55,060
Yeah.

110
00:05:55,060 --> 00:05:56,050
Now it works.

111
00:05:56,170 --> 00:05:57,550
Sorry for this error, guys.

112
00:05:57,550 --> 00:06:04,360
Actually, I was able to rerecord those videos, but actually I wanted to leave it here in place and

113
00:06:04,360 --> 00:06:04,780
sorry again.

114
00:06:04,780 --> 00:06:06,700
It's my fault and it happens.

115
00:06:06,700 --> 00:06:07,270
Yeah.

116
00:06:07,420 --> 00:06:07,840
Okay.

117
00:06:07,840 --> 00:06:09,370
Let's run installation.

118
00:06:10,380 --> 00:06:16,920
And here I see welcome page where I'm able to add site title username of administrator.

119
00:06:16,920 --> 00:06:21,420
Here is password of administrator and here you need to enter any email.

120
00:06:21,450 --> 00:06:29,160
All right, let's add the site title and I'll use Welcome to bogdan's.

121
00:06:29,160 --> 00:06:37,970
Wonderful website username will be Bogdan password will be same as here.

122
00:06:38,010 --> 00:06:39,900
Let me copy it by the way.

123
00:06:39,900 --> 00:06:44,940
And also let's add the email and I could use my personal email.

124
00:06:44,940 --> 00:06:47,400
You could use any fake email here.

125
00:06:47,400 --> 00:06:51,870
If you don't plan to publish this website somewhere in public.

126
00:06:51,870 --> 00:06:53,970
Anyway, I'll use my personal email.

127
00:06:53,970 --> 00:06:59,940
If you have something to write me, please do so it's my personal email, so let's install WordPress.

128
00:07:02,050 --> 00:07:03,490
And process was successful.

129
00:07:03,490 --> 00:07:05,080
Let me save this password here.

130
00:07:05,080 --> 00:07:07,810
And actually I need to turn on sync.

131
00:07:07,840 --> 00:07:09,040
I will do that now.

132
00:07:09,040 --> 00:07:11,530
I have actually password copied into clipboard.

133
00:07:11,530 --> 00:07:13,180
Let me log in here.

134
00:07:13,900 --> 00:07:16,210
Username Lockdown password.

135
00:07:16,210 --> 00:07:17,470
Let me copy it.

136
00:07:17,800 --> 00:07:18,730
Here it is.

137
00:07:18,760 --> 00:07:20,830
And let's check checkbox.

138
00:07:20,830 --> 00:07:22,630
Remember me and login.

139
00:07:25,440 --> 00:07:32,940
And I was successfully logged into WordPress dashboard and here you see WordPress admin and I'm actually

140
00:07:32,970 --> 00:07:37,500
able to open up front end web page by going to this address.

141
00:07:38,920 --> 00:07:40,220
And yes, I see.

142
00:07:40,240 --> 00:07:43,270
Welcome to Bogdan's Wonderful website web page.

143
00:07:43,300 --> 00:07:43,980
Great.

144
00:07:43,990 --> 00:07:50,000
Finally, I was able to launch a WordPress with MySQL and phpMyAdmin.

145
00:07:50,020 --> 00:07:54,040
By the way, let me verify connection to phpmyadmin localhost.

146
00:07:54,040 --> 00:07:55,360
8081.

147
00:07:57,740 --> 00:07:59,750
And here will be username.

148
00:07:59,750 --> 00:08:05,450
Let's say WordPress and password will be also WordPress Go.

149
00:08:05,810 --> 00:08:12,710
And I was successfully logged to MySQL server and I could list databases here and now I have actually

150
00:08:12,860 --> 00:08:15,170
access only to WordPress database.

151
00:08:15,200 --> 00:08:22,730
If you want to log in as root user, you are also able to do so by using root as username and my password

152
00:08:22,730 --> 00:08:23,750
as password.

153
00:08:23,750 --> 00:08:26,510
Here we have specified this password as well.

154
00:08:26,510 --> 00:08:27,410
Here it is.

155
00:08:28,230 --> 00:08:28,840
Great.

156
00:08:28,860 --> 00:08:30,840
That's all for this challenge.

157
00:08:30,840 --> 00:08:33,809
And again, sorry for my small error.

158
00:08:33,840 --> 00:08:34,950
I have fixed it.

159
00:08:34,950 --> 00:08:42,450
And actually that's all for this section where we have tried to create multiple containers in the custom

160
00:08:42,450 --> 00:08:43,169
network.

161
00:08:43,530 --> 00:08:44,640
I'll see you guys next.

162
00:08:44,640 --> 00:08:47,400
And next, let's try another image, for example.

163
00:08:47,400 --> 00:08:48,790
Elasticsearch Image.

164
00:08:48,810 --> 00:08:49,740
I'll see you next.

165
00:08:49,740 --> 00:08:50,340
Bye bye.

