Token导航 LogoToken导航TokenDH.com
研究检索权限需确认clawhub未标认证来源可访问clear审计通过

mariadbmariadb 搜索

Agent Skill

mariadb 用于查找、检索和筛选相关信息,适合在 OpenClaw 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

29,403

周安装

1,213

GitHub Stars

2

下载量

9,607
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:mariadb(mariadb 搜索)
来源仓库:https://github.com/ivangdavila/mariadb
安装命令:
openclaw skills install mariadb
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install mariadb

简介

帮助编写高效的 MariaDB 查询,优化索引、时态表和集群配置。

  • 适合在 OpenClaw 中处理数据库分析与性能调优任务。
  • 安装命令:openclaw skills install mariadb,通过 clawhub 安装。
  • 使用前应确认数据库连接权限及敏感数据脱敏要求。
  • 建议查看原始 README 了解 SQL 模板和故障排查指南。

SKILL.md

name
MariaDB
description
Write efficient MariaDB queries with proper indexing, temporal tables, and clustering.
metadata
{"clawdbot":{"emoji":"🦭","requires":{"bins":["mariadb"]},"os":["linux","darwin","win32"]}}

Character Set

  • Always use utf8mb4 for tables and connections—full Unicode including emoji
  • utf8mb4_unicode_ci for proper linguistic sorting, utf8mb4_bin for byte comparison
  • Set connection charset: SET NAMES utf8mb4 or in connection string
  • Collation mismatch in JOINs forces conversion—kills index usage

Indexing

  • TEXT/BLOB columns need prefix length: INDEX (description(100))
  • Composite index order matters—(a, b) serves WHERE a=? but not WHERE b=?
  • Foreign keys auto-create index on child table—but verify with SHOW INDEX
  • Covering indexes: include all SELECT columns to avoid table lookup

Sequences

  • CREATE SEQUENCE seq_name for guaranteed unique IDs across tables
  • NEXT VALUE FOR seq_name to get next—survives transaction rollback
  • Better than auto-increment when you need ID before insert
  • SETVAL(seq_name, n) to reset—useful for migrations

System Versioning (Temporal Tables)

  • ALTER TABLE t ADD SYSTEM VERSIONING to track all historical changes
  • FOR SYSTEM_TIME AS OF '2024-01-01 00:00:00' queries past state
  • FOR SYSTEM_TIME BETWEEN start AND end for change history
  • Invisible columns row_start and row_end store validity period

JSON Handling

  • JSON_VALUE(col, '$.key') extracts scalar, returns NULL if not found
  • JSON_QUERY(col, '$.obj') extracts object/array with quotes preserved
  • JSON_TABLE() converts JSON array to rows—powerful for unnesting
  • JSON_VALID() before insert if column isn't strictly typed

Galera Cluster

  • All nodes writable—but same-row conflicts cause rollback
  • wsrep_sync_wait = 1 before critical reads—ensures node is synced
  • Keep transactions small—large transactions increase conflict probability
  • wsrep_cluster_size should be odd number—avoids split-brain

Window Functions

  • ROW_NUMBER() OVER (PARTITION BY x ORDER BY y) for ranking within groups
  • LAG(col, 1) OVER (ORDER BY date) for previous row value
  • SUM(amount) OVER (ORDER BY date ROWS UNBOUNDED PRECEDING) for running total
  • CTEs with WITH cte AS (...) for readable complex queries

Thread Pool

  • Enable with thread_handling=pool-of-threads—better than thread-per-connection
  • thread_pool_size = CPU cores for CPU-bound, higher for I/O-bound
  • Reduces context switching with many concurrent connections
  • Monitor with SHOW STATUS LIKE 'Threadpool%'

Storage Engines

  • InnoDB default—ACID transactions, row locking, crash recovery
  • Aria for temporary tables—crash-safe replacement for MyISAM
  • MEMORY for caches—data lost on restart, but fast
  • Check engine: SHOW TABLE STATUS WHERE Name='table'

Locking

  • SELECT ... FOR UPDATE locks rows until commit
  • LOCK TABLES t WRITE for DDL-like exclusive access—blocks all other sessions
  • Deadlock detection automatic—one transaction rolled back; must retry
  • innodb_lock_wait_timeout default 50s—lower for interactive apps

Query Optimization

  • EXPLAIN ANALYZE for actual execution times (10.1+)
  • optimizer_trace for deep dive: SET optimizer_trace='enabled=on'
  • FORCE INDEX (idx) when optimizer chooses wrong index
  • STRAIGHT_JOIN to force join order—last resort

Backup and Recovery

  • mariadb-dump --single-transaction for consistent backup without locks
  • mariadb-backup for hot InnoDB backup—incremental supported
  • Binary logs for point-in-time recovery: mysqlbinlog binlog.000001 | mariadb
  • Test restores regularly—backups that can't restore aren't backups

Common Errors

  • "Too many connections"—increase max_connections or use connection pool
  • "Lock wait timeout exceeded"—find blocking query with SHOW ENGINE INNODB STATUS
  • "Row size too large"—TEXT/BLOB stored off-page, but row pointers have limits
  • "Duplicate entry for key"—check unique constraints, use ON DUPLICATE KEY UPDATE

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

97.66%
按下载量换算9,382

安全审计

VirusTotal

未展示

ClawScan

通过

Static analysis

未展示

权限和风险

权限需确认

当前来源未能明确判断权限范围,默认进入异常复核队列。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills