-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dodat je primer za kombinaciju za prva dva primera
- Loading branch information
1 parent
2a63aec
commit 7e5dd29
Showing
4 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
mysql -uroot -pRoot_12345 -h127.0.0.1 -P6603 |
14 changes: 14 additions & 0 deletions
14
tema07_docker/07_mysql_server/create-mysql-database/init-database.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
create database dbcustomers; | ||
use dbcustomers; | ||
|
||
create table customer( | ||
name varchar(255), | ||
surname varchar(255) | ||
); | ||
|
||
insert into | ||
customer (name, surname) | ||
values | ||
('Jeff', 'Mynameis'), | ||
('Robot', 'Murlock'), | ||
('Hell', 'boy'); |
11 changes: 11 additions & 0 deletions
11
tema07_docker/07_mysql_server/create-mysql-database/start-mysql-server-with-db.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
docker run \ | ||
--detach \ | ||
--name=mysql-server-customers-db \ | ||
--env="MYSQL_ROOT_PASSWORD=Root_12345" \ | ||
--publish 6603:3306 \ | ||
--volume=/root/docker/simple-mysql-server-db/conf.d:/etc/mysql/conf.d \ | ||
mysql | ||
|
||
sleep 10 | ||
|
||
mysql -uroot -pRoot_12345 -h127.0.0.1 -P6603 < init-database.sql |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Ovaj primer predstavlja kombinaciju prethodna dva primera. |