Skip to content

Benjr.tw

  • Linux
    • Stress & Performance
    • Hardware Info
    • System Monitor
    • Security
    • Desktop
    • PXE
    • Filesystem Hierarchy Standard
    • Linux 開機選項
    • Linux Package Manager
    • 備份 Backup
  • Virtualization
    • Docker & Podman
    • CoreOS
  • NAS/SAN
  • Programming Language
    • Bash shell script
    • Perl
    • PHP
    • Python
    • Node.JS
  • WordPress
  • DataBase
    • 資料庫安裝
    • 資料庫語法
    • MariaDB JSON

Mysql

MariaDB – max_allowed_packet size

2022-04-272022-04-27 adminLinux, MariaDB, Mysql, RedHat / CentOS

測試環境為 CentOS 8 x86_64 遇到一個奇怪問題, LONGBLOB , LONGTEXT 字元上限為 4 GB (2^32 -1),使用 4 bytes 紀錄前面字元使用長度.但是實際使用只能到 16777216 (約 16M),下面來看一下是怎麼了. 先建立一個資料庫 (testdb […]

Read more

MariaDB – SELECT Auto increment Num column

2022-04-272022-04-27 adminLinux, MariaDB, Mysql, RedHat / CentOS

測試環境為 CentOS 8 x86_64 一般我們可以透過 ROW_NUMBER() , RANK() , DENSE_RANK() – https://benjr.tw/104156 來建立序號.但無法依據某一特定欄位時要建立序號,可以使用以下方式. 先建立一個資料庫 (testdb) , 與資 […]

Read more

SQL – Primary & Unique

2022-04-222022-04-22 adminLinux, MariaDB, Mysql, RedHat / CentOS

測試環境為 CentOS 8 x86_64 如果建立好的資料表沒有 Primary 或是 Unique ,在 phpMyAdmin 會顯示. 我們需要在 資料表 / 結構 的其中之一的資料欄位設定成為 unique .或是 Primary Key (主鍵) – 必須為 not null (不能為空) […]

Read more

SQL 資料型態 – FLOAT , DOUBLE & DECIMAL

2022-04-212022-04-22 adminLinux, MariaDB, Mysql, RedHat / CentOS

測試環境為 CentOS 8 x86_64 虛擬機. 浮點數有 FLOAT , DOUBLE 跟 DECIMAL ,資料大小範圍如下. FLOAT[(M,D)] [SIGNED | UNSIGNED | ZEROFILL] -3.402823466E+38 to -1.175494351E-38 0 […]

Read more

MariaDB – SELECT rows with max value

2022-04-122022-04-12 adminLinux, MariaDB, Mysql, RedHat / CentOS

測試環境為 CentOS 8 X86_64 (虛擬機) 要找出指定欄位的最大(小)值,可以透過 MAX() , MIN() 函數來搜尋,但是要知道是哪一行的資料(想一併得知其他欄位資料)時,可以透過 ROW_NUMBER() 函數來使用. 先建立一個資料庫 (testdb) , 與 Student […]

Read more

MariaDB – Correlated Subqueries

2022-03-092022-03-09 adminLinux, MariaDB, Mysql, RedHat / CentOS

測試環境為 CentOS 8 X86_64 (虛擬機) 怎麼在 GROUP 時,找到 第二,三 … 的值. 先建立一個資料庫 (testdb) , 與 tables (employee) 格式為 Name char(20), Dept char(20), jobTitle char(20 […]

Read more

MariaDB – LIMIT row_count OFFSET offset

2022-03-092022-03-09 adminLinux, MariaDB, Mysql, RedHat / CentOS

測試環境為 CentOS 8 X86_64 (虛擬機) 要找出最大值的時候可以透過 MAX 或是 LIMIT 1,但是要找第二,三 … 的值呢? 可以透過 LIMIT 先建立一個資料庫 (testdb) , 與 tables (Employee) 格式為 ID INT(11) 以及 Sa […]

Read more

MariDB – SOUNDS LIKE

2022-03-092022-03-09 adminLinux, MariaDB, Mysql, RedHat / CentOS

測試環境為 CentOS 8 X86_64 (虛擬機) SOUNDS LIKE 可以用來比對發音很像的字串. 先建立一個資料庫 (testdb) , 與 tables (employee) 格式為 Name char(20), Dept char(20), jobTitle char(20) 各 2 […]

Read more

MariDB – Logging

2022-02-252022-02-25 adminLinux, MariaDB, Mysql, RedHat / CentOS

測試環境為 CentOS 8 x86_64 (虛擬機) . 關於 MariaDB 的 Logging 參考文章 – https://betterstack.com/community/guides/logging/database/how-to-start-logging-with-ma […]

Read more

MariaDB – Time Zone

2022-02-242022-02-24 adminLinux, MariaDB, Mysql, RedHat / CentOS

測試環境為 CentOS 8 x86_64 (虛擬機) . 遇到一個奇怪的問題,在不同機器上使用 UNIX_TIMESTAMP(TS) 函數 (該函數功能為把時間轉換成為數字,轉換方式為: 指定的時間 -(減去) 1970-01-01 00:00:00 得到的秒數差, 回傳為無符號整數) 卻得到不同 […]

Read more

文章導覽

較舊的文章

近期文章

  • Python – Class 的 Static / Class / Abstract Method
  • Python – docstring
  • Python – _ (底線) 與 _ _(雙底線)
  • Python – __init__ , __str__ , __repr__
  • Python – Property & _attribute

近期留言

  • 「N/A」於〈Linux – iperf (Bind to host)〉發佈留言
  • 「topvpn」於〈就是要上網 – OpenVPN ( 二) Client〉發佈留言
  • 「zoeyalee」於〈在 WordPress 使用 Facebook 讚的連結〉發佈留言
  • 「Carter」於〈VMware PXE 安裝〉發佈留言
  • 「路人甲」於〈iperf – Bidirectional test (雙向測試)〉發佈留言

分類

其他操作

  • 登入
  • 訂閱網站內容的資訊提供
  • 訂閱留言的資訊提供
  • WordPress.org 台灣繁體中文
Powered by WordPress | Theme: Astrid by aThemes.