---
# System prepended metadata

title: Database

---

# Database
DB_HOST=127.0.0.1
DB_USER=b856
DB_PASS=1234
DB_NAME=nanpaodb
DB_PORT=3306

https://hackmd.io/GFFFuKroRNSAqWMLvqBgNg

```
#set the complete "forgiving" mode
mysql> SET GLOBAL sql_mode='';

# alternatively you can set sql mode to the following
mysql> SET GLOBAL sql_mode='STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_ENGINE_SUBSTITUTION';

SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));
```

ERROR 1055 (42000): Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'scanna_paperless.searchTable.pdf_name' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

```
mysql> SELECT @@sql_mode;
+----------------------------------------------------------------------------------------------------+
| @@sql_mode                                                                                         |
+----------------------------------------------------------------------------------------------------+
| STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION |
+----------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

mysql> SET @@sql_mode = 'STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION';

```

加大@@group_concat_max_len
https://blog.csdn.net/world_ding/article/details/54286862

```
set global group_concat_max_len = 102400;
```

重開mysql
https://blog.csdn.net/weixin_36466834/article/details/105529624


# Logs
LOG_DIR=C:\logs

ALTER USER 'daisy'@'localhost' IDENTIFIED WITH mysql_native_password BY '1234';
flush privileges;

Dump20220427.sql
https://hackmd.io/GFFFuKroRNSAqWMLvqBgNg?view

## Moxa UC8112LX cross compiler
如何安裝
systex@systex-VirtualBox:~/newdisk/develop/B856_SILENSYS/green-harrison/src/source$ make -C application/monitor/build.ubuntu/
make: Entering directory '/home/systex/newdisk/develop/B856_SILENSYS/green-harrison/src/source/application/monitor/build.ubuntu'
Linking /home/systex/newdisk/develop/B856_SILENSYS/green-harrison/src/source/application/monitor/bin/monitor
/usr/local/arm-linux-gnueabihf-6.3/usr/bin/../lib/gcc-cross/arm-linux-gnueabihf/6/../../../../arm-linux-gnueabihf/bin/ld: cannot find -systex@systex-VirtualBox:~/newdisk/develop/B856_SILENSYS/green-harrison/src/source$ make -C application/monitor/build.ubuntu/
make: Entering directory '/home/systex/newdisk/develop/B856_SILENSYS/green-harrison/src/source/application/monitor/build.ubuntu'
Linking /home/systex/newdisk/develop/B856_SILENSYS/green-harrison/src/source/application/monitor/bin/monitor
/usr/local/arm-linux-gnueabihf-6.3/usr/bin/../lib/gcc-cross/arm-linux-gnueabihf/6/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lz
collect2: error: ld returned 1 exit status
make: *** [/home/systex/newdisk/develop/B856_SILENSYS/green-harrison/src/source/application/common/targets.mk:64: /home/systex/newdisk/develop/B856_SILENSYS/green-harrison/src/source/application/monitor/bin/monitor] Error 1
make: Leaving directory '/home/systex/newdisk/develop/B856_SILENSYS/green-harrison/src/source/application/monitor/build.ubuntu'
lz
collect2: error: ld returned 1 exit status
make: *** [/home/systex/newdisk/develop/B856_SILENSYS/green-harrison/src/source/application/common/targets.mk:64: /home/systex/newdisk/develop/B856_SILENSYS/green-harrison/src/source/application/monitor/bin/monitor] Error 1
make: Leaving directory '/home/systex/newdisk/develop/B856_SILENSYS/green-harrison/src/source/application/monitor/build.ubuntu'

https://www.gushiciku.cn/pl/pBLb/zh-tw
http://www.zhishibo.com/articles/86223.html
https://git.systex.com/systex2020/B80B_PROJECT_DETAIL/-/wikis/build-work-flow


```
arm-linux-gnueabihf install complete
Please export these environment variables before using toolchain:
export PATH=$PATH:/usr/local/arm-linux-gnueabihf-6.3/usr/bin

```


## 虛擬機器擴增

https://blog.csdn.net/NarutoInspire/article/details/82179963


## cmake install

https://shengyu7697.github.io/ubuntu-cmake/

## C compiler

https://git.systex.com/systex2020/B80B_PROJECT_DETAIL/-/wikis/build-work-flow
https://git.systex.com/systex/B856_SILENSYS/-/tree/develop

---
