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
    • Python
    • Bash shell script
    • Perl
    • PHP
    • Node.JS
    • VBA
    • javascript
    • Power Query
    • PowerShell
  • WordPress
  • DataBase
    • 資料庫安裝
    • 資料庫語法
    • SQLite
    • MariaDB JSON

MariaDB

MariaDB / MySQL 資料庫備份與還原

2019-05-242024-04-16 adminLinux, MariaDB, Mysql, RedHat / CentOS

Loading

測試環境為 CentOS 7 x86_64 (虛擬機) Server A (IP : 192.168.111.129) Server B (IP : 192.168.111.157) 先在 Server A 建立一些測試用資料. 建立 testdb 資料庫與 employee , employee1 […]

Read more

MariaDB / MySQL – Event Scheduler

2019-05-222022-03-23 adminMariaDB, Mysql, RedHat / CentOS

Loading

測試環境為 CentOS 7 / CentOS 8 x86_64 (虛擬機) 在 Linux 環境可以透過 crontab (自動排程)來定期執行任務,如果是要自動執行 SQL 指令(如:定期刪除資料…),可以透過 SQL 的 Event Scheduler 啟動 Event Sched […]

Read more

SQL – 大量資料轉檔 (Text File)

2019-04-242021-03-03 adminLinux, MariaDB, Mysql, RedHat / CentOS

Loading

測試環境為 CentOS 7 x86_64 (虛擬機) 如何利用 SQL 的 INSERT 語法將文字檔案的內容自動轉到資料庫裡. 如果是單一檔案內容上傳至單一欄位可以使用 LOAD_FILE 函數,詳細使用請參考 – https://benjr.tw/101779 . Linux Ba […]

Read more

SQL 資料型態 – INT (Integer)

2019-04-032020-04-24 adminLinux, MariaDB, Mysql, RedHat / CentOS

Loading

測試環境為 CentOS 7 x86_64 虛擬機. INT (Integer) 整數型態的種類如下: 型態 Byte(s) 預設長度 有號數 (Signed +,-) 範圍 無號數 (Unsigned) 範圍 TINYINT 1 4 -128~127 0~255 SMALLINT 2 6 -327 […]

Read more

Linux – 預設的資料庫 mysql

2018-06-132024-01-23 adminLinux, MariaDB, Mysql, RedHat / CentOS

Loading

測試環境為 CentOS 7 x86_64 . 安裝好的 Mariadb 會有一個預設資料庫 mysql. 進入 mysql 資料庫看看裡面儲存了哪一些 tables. User table 來看看 User table 的內容,主要儲存使用者的資料,包含 Host , User , Passwor […]

Read more

MariaDB 自訂函數權限

2018-05-032019-11-07 adminLinux, MariaDB, Mysql, Ubuntu

Loading

測試環境為 CentOS 7 x86_64 使用者的權限可以區分為 登入權限,請參考 https://benjr.tw/97973 使用者存取 資料庫(DateBase)/資料表(Table)/資料欄(column)權限,請參考 https://benjr.tw/98033 權限有分為 管理權限 結 […]

Read more

SQL 自訂函數 (單位字串轉數值)

2018-01-102022-04-22 adminLinux, MariaDB, Mysql, Ubuntu

Loading

測試環境為 Ubuntu16.04 x86_64 虛擬機. 當 SQL 函數 (Function) 沒有符合我們的需求時,可以自訂函數 User-Defined Function (UDF) 設定格式如下: 直接來看一個範例,在計算機系統關於容量,大小會透過簡寫的方式來表示,自訂一個函數 conve […]

Read more

SQL 自訂函數 (數值轉單位字串)

2018-01-092022-04-22 adminLinux, MariaDB, Mysql, Ubuntu

Loading

測試環境為 Ubuntu16.04 x86_64 虛擬機. 當 SQL 函數 (Function) 沒有符合我們的需求時,可以自訂函數 User-Defined Function (UDF) 設定格式如下: 直接來看一個範例,在計算機系統關於容量,大小會透過簡寫的方式來表示,自訂一個函數 forma […]

Read more

SQL 資料型態 – TIMESTAMP

2018-01-082020-06-09 adminLinux, MariaDB, Mysql, Ubuntu

Loading

這邊來看一下 TIMESTAMP 這個資料型態. 測試環境為 Ubuntu16.04 x86_64 虛擬機. 建立一個有 timestamp 欄位的資料表 table ,預設值為 current_timestamp (日期時間函數,功能與 NOW 一樣,都是回傳目前系統的日期時間),on updat […]

Read more

SQL 語法 進階 SELECT

2018-01-032022-04-29 adminLinux, MariaDB, Mysql, Ubuntu

Loading

測試環境為 Ubuntu 16.04 x86_64 ,下面針對 SQL SELECT 的 WHERE , GROUP BY , HAVING , ORDER BY , LIMIT 與 sub-query 使用方式做說明, SELECT 查詢需注意資料庫字元編碼 Character Sets 與 文字 […]

Read more

文章導覽

較舊的文章
較新的文章

近期文章

  • Windows – Network Sharing + Port forwarding to VM
  • Ansible – gather facts
  • Ansible – host_vars 定義特定的變量
  • Ansible 範例 – Chrony daemon
  • Ubuntu NTP Client 校時設定

近期留言

  • 「Jackson2734」於〈Ubuntu NTP Client 校時設定〉發佈留言
  • 「admin」於〈TCP/IP 常見封包〉發佈留言
  • 「stu」於〈TCP/IP 常見封包〉發佈留言
  • 「[ubuntu]—擴充硬碟空間 – Randy的隨手筆記」於〈Linux command – parted / (resize , resizepart) + resize2fs〉發佈留言
  • 「darkknight」於〈Windows – Fio〉發佈留言

分類

其他操作

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