You are on page 1of 8

Microsoft Windows [Version 10.0.19042.

630]

(c) 2020 Microsoft Corporation. All rights reserved.

C:\Users\lenovo>mysql -u root -p

Enter password: ********

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

Your MySQL connection id is 64

Server version: 8.0.21 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> use iotedge_v2;

Database changed

mysql>

mysql>

mysql>

mysql> select * from devices;

+----+-----------+--------+--------------+----------------+-------------------------+----------
+------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------+
| id | entity_id | status | ll_device_id | ll_device_name | ll_device_serial_number | mode |
config_json
|

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

| 1| 1 | 1 | 7736 | CAAQMS_PM10 | S17241627631062936 | comPort |


{"devicePort":
{"commandMode":"RTU","opMode":"Read","startingAddress":"1","paramAddress":"1","baudRate":
"9600","parity":"8","dataBits":"8","stopBits":"1","addressLength":"16","readLength":"16","comPort"
:"COM3","multiplyingFactor":"1","slaveId":"1","functionCode":"03","dataType":"32Bit Floating point
AB","status":"ENABLED","readCommand":"7D7B011601F1575500008A667D7D","analyzerType":"BP
M200","scale":"false","lowScale":null,"highScale":null,"model":"fpi"}} |

| 2| 1 | 1 | 7737 | CAAQMS_PM2.5 | S17241627631353117 | dataBase |


{"databaseConfig":
{"driveClassName":"a","url":"a","username":"a","password":"a","dependentQueries":"a"}}
|

| 3| 1 | 1 | 7738 | CAAQMS_NO2 | S17241627631517946 | dataBase |


{"databaseConfig":
{"driveClassName":"a","url":"a","username":"a","password":"a","dependentQueries":"a"}}
|

| 4| 1 | 1 | 7739 | CAAQMS_SO2 | S17241627631666998 | dataBase |


{"databaseConfig":
{"driveClassName":"a","url":"a","username":"a","password":"a","dependentQueries":"a"}}
|

| 5| 1 | 1 | 7740 | CAAQMS_CO | S17241627631757302 | dataBase |


{"databaseConfig":
{"driveClassName":"a","url":"a","username":"a","password":"a","dependentQueries":"a"}}
|

| 6| 1 | 1 | 7741 | CAAQMS_O3 | S17241627631841881 | dataBase |


{"databaseConfig":
{"driveClassName":"a","url":"a","username":"a","password":"a","dependentQueries":"a"}}
|

| 7| 1 | 1 | 7742 | CAAQMS_VOC | S17241627631932910 | dataBase |


{"databaseConfig":
{"driveClassName":"a","url":"a","username":"a","password":"a","dependentQueries":"a"}}
|
| 8| 1 | 1 | 7743 | CAAQMS_NH3 | S17241627632017175 | dataBase |
{"databaseConfig":
{"driveClassName":"a","url":"a","username":"a","password":"a","dependentQueries":"a"}}
|

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

8 rows in set (0.00 sec)

mysql>

mysql> select mode from devices where id=1;

+---------+

| mode |

+---------+

| comPort |

+---------+

1 row in set (0.00 sec)

mysql> update devices set mode='comPort' where id=1;

Query OK, 0 rows affected (0.03 sec)

Rows matched: 1 Changed: 0 Warnings: 0

mysql> update devices set mode='comPort' ;

Query OK, 7 rows affected (0.08 sec)

Rows matched: 8 Changed: 7 Warnings: 0

mysql> select config_json from devices where id=1;

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

| config_json
|

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

| {"devicePort":
{"commandMode":"RTU","opMode":"Read","startingAddress":"1","paramAddress":"1","baudRate":
"9600","parity":"8","dataBits":"8","stopBits":"1","addressLength":"16","readLength":"16","comPort"
:"COM3","multiplyingFactor":"1","slaveId":"1","functionCode":"03","dataType":"32Bit Floating point
AB","status":"ENABLED","readCommand":"7D7B011601F1575500008A667D7D","analyzerType":"BP
M200","scale":"false","lowScale":null,"highScale":null,"model":"fpi"}} |

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

1 row in set (0.05 sec)

mysql>

mysql> update devices set config_json='{"devicePort":


{"commandMode":"RTU","opMode":"Read","startingAddress":"1","paramAddress":"1","baudRate":
"9600","parity":"8","dataBits":"8","stopBits":"1","addressLength":"16","readLength":"16","comPort"
:"COM3","multiplyingFactor":"1","slaveId":"1","functionCode":"03","dataType":"32Bit Floating point
AB","status":"ENABLED","readCommand":"7D7B011601F1575500008A667D7D","analyzerType":"BP
M200","scale":"false","lowScale":null,"highScale":null,"model":"fpi"}}';

Query OK, 7 rows affected (0.08 sec)

Rows matched: 8 Changed: 7 Warnings: 0

mysql> exit;

Bye

C:\Users\lenovo>mysql -u root -p
Enter password: ********

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

Your MySQL connection id is 143

Server version: 8.0.21 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> use iotedge_v2;

Database changed

mysql> select * from devices;

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

| id | entity_id | status | ll_device_id | ll_device_name | ll_device_serial_number | mode |


config_json
|

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

| 1| 1 | 1 | 7736 | CAAQMS_PM10 | S17241627631062936 | comPort |


{"devicePort":
{"commandMode":"RTU","opMode":"Read","startingAddress":"1","paramAddress":"50","baudRate"
:"9600","parity":"8","dataBits":"8","stopBits":"1","addressLength":"16","readLength":"16","comPort
":"COM3","multiplyingFactor":"1","slaveId":"1","functionCode":"03","dataType":"32Bit Floating
point
AB","status":"ENABLED","readCommand":"7D7B011601F1575500008A667D7D","analyzerType":"BP
M200","scale":"false","lowScale":null,"highScale":null,"model":"fpi"}} |

| 2| 1 | 1 | 7737 | CAAQMS_PM2.5 | S17241627631353117 | comPort |


{"devicePort":
{"commandMode":"RTU","opMode":"Read","startingAddress":"1","paramAddress":"50","baudRate"
:"9600","parity":"8","dataBits":"8","stopBits":"1","addressLength":"16","readLength":"16","comPort
":"COM4","multiplyingFactor":"1","slaveId":"1","functionCode":"03","dataType":"32Bit Floating
point
AB","status":"ENABLED","readCommand":"7D7B011601F1575500008A667D7D","analyzerType":"BP
M200","scale":"false","lowScale":null,"highScale":null,"model":"fpi"}} |

| 3| 1 | 1 | 7738 | CAAQMS_NO2 | S17241627631517946 | comPort |


{"devicePort":
{"commandMode":"RTU","opMode":"Read","startingAddress":"1","paramAddress":"50","baudRate"
:"9600","parity":"8","dataBits":"8","stopBits":"1","addressLength":"16","readLength":"62","comPort
":"COM5","multiplyingFactor":"1","slaveId":"1","functionCode":"03","dataType":"32Bit Floating
point
AB","status":"ENABLED","readCommand":"7D7B011601F1575500008A667D7D","analyzerType":"AQ
MS600","scale":"false","lowScale":null,"highScale":null,"model":"fpi"}} |

| 4| 1 | 1 | 7739 | CAAQMS_SO2 | S17241627631666998 | comPort |


{"devicePort":
{"commandMode":"RTU","opMode":"Read","startingAddress":"1","paramAddress":"50","baudRate"
:"9600","parity":"8","dataBits":"8","stopBits":"1","addressLength":"16","readLength":"16","comPort
":"COM6","multiplyingFactor":"1","slaveId":"1","functionCode":"03","dataType":"32Bit Floating
point
AB","status":"ENABLED","readCommand":"7D7B011601F1575500008A667D7D","analyzerType":"AQ
MS500","scale":"false","lowScale":null,"highScale":null,"model":"fpi"}} |

| 5| 1 | 1 | 7740 | CAAQMS_CO | S17241627631757302 | comPort |


{"devicePort":
{"commandMode":"RTU","opMode":"Read","startingAddress":"1","paramAddress":"50","baudRate"
:"9600","parity":"8","dataBits":"8","stopBits":"1","addressLength":"16","readLength":"16","comPort
":"COM7","multiplyingFactor":"1","slaveId":"1","functionCode":"03","dataType":"32Bit Floating
point
AB","status":"ENABLED","readCommand":"7D7B011601F1575500008A667D7D","analyzerType":"AQ
MS400","scale":"false","lowScale":null,"highScale":null,"model":"fpi"}} |

| 6| 1 | 1 | 7741 | CAAQMS_O3 | S17241627631841881 | comPort |


{"devicePort":
{"commandMode":"RTU","opMode":"Read","startingAddress":"1","paramAddress":"1","baudRate":
"9600","parity":"8","dataBits":"8","stopBits":"1","addressLength":"16","readLength":"16","comPort"
:"COM8","multiplyingFactor":"1","slaveId":"1","functionCode":"03","dataType":"32Bit Floating point
AB","status":"ENABLED","readCommand":"7D7B011601F1575500008A667D7D","analyzerType":"BP
M200","scale":"false","lowScale":null,"highScale":null,"model":"fpi"}} |

| 7| 1 | 1 | 7742 | CAAQMS_VOC | S17241627631932910 | comPort |


{"devicePort":
{"commandMode":"RTU","opMode":"Read","startingAddress":"1","paramAddress":"1","baudRate":
"9600","parity":"8","dataBits":"8","stopBits":"1","addressLength":"16","readLength":"16","comPort"
:"COM3","multiplyingFactor":"1","slaveId":"1","functionCode":"03","dataType":"32Bit Floating point
AB","status":"ENABLED","readCommand":"7D7B011601F1575500008A667D7D","analyzerType":"BP
M200","scale":"false","lowScale":null,"highScale":null,"model":"fpi"}} |

| 8| 1 | 1 | 7743 | CAAQMS_NH3 | S17241627632017175 | comPort |


{"devicePort":
{"commandMode":"RTU","opMode":"Read","startingAddress":"1","paramAddress":"1","baudRate":
"9600","parity":"8","dataBits":"8","stopBits":"1","addressLength":"16","readLength":"16","comPort"
:"COM9","multiplyingFactor":"1","slaveId":"1","functionCode":"03","dataType":"32Bit Floating point
AB","status":"ENABLED","readCommand":"7D7B011601F1575500008A667D7D","analyzerType":"BP
M200","scale":"false","lowScale":null,"highScale":null,"model":"fpi"}} |

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

8 rows in set (0.00 sec)

mysql> select mode from devices;

+---------+

| mode |

+---------+

| comPort |

| comPort |

| comPort |

| comPort |

| comPort |

| comPort |

| comPort |
| comPort |

+---------+

8 rows in set (0.00 sec)

mysql> select * from devices limit 1;

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

| id | entity_id | status | ll_device_id | ll_device_name | ll_device_serial_number | mode |


config_json
|

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

| 1| 1 | 1 | 7736 | CAAQMS_PM10 | S17241627631062936 | comPort |


{"devicePort":
{"commandMode":"RTU","opMode":"Read","startingAddress":"1","paramAddress":"50","baudRate"
:"9600","parity":"8","dataBits":"8","stopBits":"1","addressLength":"16","readLength":"16","comPort
":"COM3","multiplyingFactor":"1","slaveId":"1","functionCode":"03","dataType":"32Bit Floating
point
AB","status":"ENABLED","readCommand":"7D7B011601F1575500008A667D7D","analyzerType":"BP
M200","scale":"false","lowScale":null,"highScale":null,"model":"fpi"}} |

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

1 row in set (0.00 sec)

mysql>

You might also like