... | ... | @@ -78,7 +78,7 @@ $ mysql> INSERT INTO users VALUES |
|
|
|
|
|
You can deploy MySQL in a docker container as following:
|
|
|
|
|
|
```
|
|
|
```bash
|
|
|
$ docker run --name cn5g-mysql --network oai-cn5g-test-public-net -d mysql/mysql-server:5.7
|
|
|
$ cd oai-cn5g-amf
|
|
|
$ docker cp build/scripts/oai_db.sql cn5g-mysql:/home
|
... | ... | @@ -88,7 +88,7 @@ $ docker exec -it cn5g-mysql /bin/bash |
|
|
|
|
|
Then, check the default password (`GENERATED ROOT PASSWORD`) by using the following command
|
|
|
|
|
|
```
|
|
|
```bash
|
|
|
$ docker logs cn5g-mysql
|
|
|
```
|
|
|
The expected output is as following
|
... | ... | @@ -119,7 +119,7 @@ Warning: Unable to load '/usr/share/zoneinfo/zone1970.tab' as time zone. Skippin |
|
|
|
|
|
Then, connect to the MySQL by executing the following commmand
|
|
|
|
|
|
```
|
|
|
```bash
|
|
|
#provide the corresponding password to login to MySQL
|
|
|
$ docker exec -it cn5g-mysql mysql -uroot -p
|
|
|
|
... | ... | @@ -127,7 +127,7 @@ Warning: Unable to load '/usr/share/zoneinfo/zone1970.tab' as time zone. Skippin |
|
|
|
|
|
From MySQL, modify the password and import the DB
|
|
|
|
|
|
```
|
|
|
```bash
|
|
|
mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'linux';
|
|
|
|
|
|
#IMPORT DB:
|
... | ... | @@ -138,7 +138,7 @@ mysql> INSERT INTO users VALUES ('208950000000031','380561234567','5500000000000 |
|
|
```
|
|
|
Finally you need to grant the remote access to MySQL from AMF:
|
|
|
|
|
|
```
|
|
|
```bash
|
|
|
mysql> GRANT ALL ON oai_db.* TO root@AMF_IP_ADDR IDENTIFIED BY 'linux';
|
|
|
```
|
|
|
Where AMF_IP_ADDR is the IP Address of the AMF
|
... | ... | @@ -219,7 +219,7 @@ done |
|
|
```
|
|
|
Then, generate the configuration file for AMF (`/usr/local/etc/oai/amf.conf`) by executing the following command
|
|
|
|
|
|
```
|
|
|
```bash
|
|
|
ubuntu@test-amf:~/oai-cn5g-amf/build/scripts$ ./generate_amf_conf.sh
|
|
|
```
|
|
|
|
... | ... | @@ -227,7 +227,7 @@ ubuntu@test-amf:~/oai-cn5g-amf/build/scripts$ ./generate_amf_conf.sh |
|
|
|
|
|
After that, you can launch AMF by executing the following command
|
|
|
|
|
|
```
|
|
|
```bash
|
|
|
ubuntu@test-amf:~/oai-cn5g-amf/build/scripts$ sudo amf -c /usr/local/etc/oai/amf.conf -o
|
|
|
```
|
|
|
|