Home | 简体中文 | 繁体中文 | 杂文 | 知乎专栏 | 51CTO学院 | CSDN程序员研修院 | Github | OSChina 博客 | 腾讯云社区 | 阿里云栖社区 | Facebook | Linkedin | Youtube | 打赏(Donations) | About
知乎专栏多维度架构

Netkiller Database 手札

PostgreSQL, MariaDB, MySQL, Oracle, Redis, MongoDB, Elasticsearch ...

Mr. Neo Chan, 陈景峯(BG7NYT)



中国广东省深圳市望海路半岛城邦三期
518067
+86 13113668890


文档初创于April 6, 2008

电子书最近一次更新于 2021-11-19 17:46:32

版权声明

转载请与作者联系,转载时请务必标明文章原始出处和作者信息及本声明。

http://www.netkiller.cn
http://netkiller.github.io
http://netkiller.sourceforge.net
微信公众号: netkiller
微信:13113668890 请注明“读者”
QQ:13721218 请注明“读者”
QQ群:128659835 请注明“读者”
知乎专栏 | 多维度架构

$Date: 2013-05-21 19:01:33 +0800 (Tue, 21 May 2013) $


致读者

Netkiller 系列手札 已经被 Github 收录,并备份保存在北极地下250米深的代码库中,备份会保留1000年。

Preserving open source software for future generations

The world is powered by open source software. It is a hidden cornerstone of modern civilization, and the shared heritage of all humanity.

The GitHub Arctic Code Vault is a data repository preserved in the Arctic World Archive (AWA), a very-long-term archival facility 250 meters deep in the permafrost of an Arctic mountain.

We are collaborating with the Bodleian Library in Oxford, the Bibliotheca Alexandrina in Egypt, and Stanford Libraries in California to store copies of 17,000 of GitHub’s most popular and most-depended-upon projects—open source’s “greatest hits”—in their archives, in museum-quality cases, to preserve them for future generations.

https://archiveprogram.github.com/arctic-vault/

目录

1. 自述
1.1. 写给读者
1.2. 作者简介
1.3. 如何获得文档
1.4. 打赏(Donations)
1.5. 联系方式
I. Database Relational
1. DB-Engines - DB-Engines Ranking
2. SysBench
3. SuperSmack
4. ETL (Extract-Transform-Load)
4.1. Kettle
4.1.1. 安装
4.1.1.1. Mac 安装
4.1.1.2.
4.2. suro
5. 数据迁移
5.1. Apache Sqoop
6. GreenSQL
7. Database design & E-R diagram
7.1. opensource database design tools
7.2. OpenSystemArchitect
7.3. SQL Power Architect
II. Search Engine
8. Elasticsearch
8.1. 安装 Elasticsearch
8.1.1. 6.x 安装
8.1.2. 单机模式 (适用于开发环境) 5.x
8.1.3. Elasticsearch Cluster 5.x
8.1.3.1. 负载均衡配置
8.1.4. docker-compose 安装
8.1.5. Kubernetes
8.1.6. netkiller-devops 编排 elasticsearch
8.1.7. 安装指定版本的 Elasticsearch
8.1.8. Plugin
8.1.8.1. elasticsearch-analysis-ik
8.1.8.2. elasticsearch-analysis-pinyin
8.1.9. Elastic Cloud on Kubernetes
8.1.10. 发现配置
8.1.10.1. 即将废弃
8.2. 文档API
8.2.1. 快速上手
8.2.2. 写入 PUT/POST
8.2.3. 获取 GET
8.2.3.1. _source
8.2.4. 检查记录是否存在
8.2.5. 删除 Delete
8.2.6. 参数
8.2.6.1. pretty 格式化 json
8.3. 搜索
8.3.1. URL 搜索
8.3.2. 分页
8.4. Query DSL
8.4.1. match 匹配
8.4.2. multi_match 多字段匹配
8.4.3. Query bool 布尔条件
8.4.3.1. must
8.4.3.2. should
8.4.3.3. must_not
8.4.4. filter 过滤
8.4.5. sort 排序
8.4.6. _source
8.4.7. highlight 高亮处理
8.5. 集群管理
8.5.1. 节点健康状态
8.5.2. 节点http状态
8.5.3. 查看master节点
8.5.4. 查看索引的节点分布
8.5.5. 索引的开启与关闭
8.5.5.1. _open
8.5.5.2. _close
8.6. 中文分词插件管理
8.6.1. 通过 elasticsearch-plugin 命令安装分词插件
8.6.2. 手工安装插件
8.6.3. 创建索引
8.6.4. 删除索引
8.6.5. 配置索引分词插件
8.6.5.1. 测试分词效果
8.7. 索引管理
8.7.1. 查看索引
8.7.2. 删除索引
8.8. 映射
8.8.1. 查看 _mapping
8.8.2. 删除 _mapping
8.8.3. 创建 _mapping
8.8.4. 更新 mapping
8.8.5. 修改 _mapping
8.8.6. 数据类型
8.8.6.1. date
8.9. Alias management 别名管理
8.9.1. 查看索引别名
8.9.2. 创建索引别名
8.9.3. 修改别名
8.9.4. 删除别名
8.10. Example
8.10.1. 新闻资讯应用案例
8.10.2. 文章搜索案例
8.11. Migrating MySQL Data into Elasticsearch using logstash
8.11.1. 安装 logstash
8.11.2. 配置 logstash
8.11.3. 启动 Logstash
8.11.4. 验证
8.11.5. 配置模板
8.11.5.1. 全量导入
8.11.5.2. 多表导入
8.11.5.3. 通过 ID 主键字段增量复制数据
8.11.5.4. 通过日期字段增量复制数据
8.11.5.5. 指定SQL文件
8.11.5.6. 参数传递
8.11.5.7. 控制返回JDBC数据量
8.11.5.8. 输出到不同的 Elasticsearch 中
8.11.5.9. 日期格式转换
8.11.5.10. example
8.11.6. 解决数据不对称问题
8.11.7. 修改 Mapping
8.12. ElasticHD
8.13. 安装 Elasticsearch 2.3
8.13.1. RPM 安装
8.13.2. YUM 安装
8.13.3. 测试安装是否正常
8.13.4. Plugin 插件管理
8.13.4.1. 手工安装插件
8.13.4.2. plugin 命令
8.13.4.3. 插件测试
8.14. FAQ
8.14.1. Plugin [analysis-ik] is incompatible with Elasticsearch [2.3.5]. Was designed for version [2.3.4]
8.14.2. plugin [analysis-ik] is incompatible with version [5.6.1]; was designed for version [5.5.2]
8.14.3. mapper_parsing_exception: failed to parse [ctime]
8.14.4. 配置 JAVA_HOME
8.14.5. memory locking requested for elasticsearch process but memory is not locked
9. Solr
9.1. 安装
9.2. Core Admin
9.2.1. Schema
9.3. 索引
9.3.1. Indexing a directory of "rich" files
9.3.2. Indexing Solr XML
9.3.3. Indexing JSON
9.3.4. Deleting Data
9.4. 接口
9.4.1. 查询
9.5. FAQ
9.5.1. NOTE: Please install lsof as this script needs it to determine if Solr is listening on port 8983.
9.6. Solr 1.3.0
9.6.1. Embedded Jetty
9.6.2. Jetty
9.6.3. Tomcat
9.6.4. solr-php-client
9.6.5. multicore
9.6.6. 中文分词
9.6.6.1. ChineseTokenizerFactory
9.6.6.2. CJK
9.6.6.3. mmseg4j
9.6.6.4. 中文分词“庖丁解牛” Paoding Analysis
10. Nutch
11. Sphinx
12. Lucene
13. MG4J
14. PhpDig
15. Mahout
16. Apache Hbase
16.1. 安装 Apache Hbase
16.1.1. 单机模式安装
16.1.2. 伪分布式模式
16.1.3. 分布式模式部署
16.1.4. 运维技巧
16.2. 配置 Apache Hbase
16.2.1. hbase-env.sh
16.2.2. hbase-site.xml
16.3. Hbase Shell
16.3.1. 表操作
16.4. Web UI
16.5. Phoenix
16.5.1. 安装 Phoenix
16.5.2. sqlline.py 命令行界面
16.5.2.1. 帮助信息
16.5.2.2. 创建表
16.5.3. SQuirreL SQL Client
16.6. FAQ
16.6.1. HBaseConfTool : Unsupported major.minor version 51.0
16.6.2. ignoring option PermSize=128m; support was removed in 8.0
17. Apache Hive
17.1. 安装 Apache Hive
17.1.1. MySQL
17.1.2. Hadoop
17.1.3. Hive
17.1.4. 启动 Hive
17.1.5. 访问 Hive
17.1.6. 配置 hiveserver2
17.2. beeline
17.3. 管理 Hive
17.3.1. 表管理
17.3.1.1. 创建表
17.3.1.2. 显示表
17.3.1.3. 删除表
17.3.1.4. 查看表结构
17.3.1.5. 为表增加字段
17.3.1.6. 修改表名称
17.3.1.7. 使用已有表结构创建新表
17.3.2. 分区表
17.3.2.1. 创建分区表
17.3.2.2. 显示分区情况
17.3.2.3. 增加分区
17.3.2.4. 向分区表导入数据
17.3.3. 视图管理
17.3.3.1. 创建视图
17.3.3.2. 删除视图
17.3.4. 数据管理
17.3.4.1. 从文本文件导入数据
17.3.4.2. 从其他表查询数据并创建新表
17.3.4.3. 从其他表查询数据然后插入指定表中
17.3.4.4. 从现有表中查询数据然后插入到新的分区表中
17.3.5. HDFS与本地文件系统管理
17.3.5.1. HDFS 目录迁移
17.3.5.2. 导出表数据到本地文件
17.3.5.3. 导出到HDFS
17.3.5.4.
17.4. HiveQL - Hive查询语言
17.4.1. JOIN 连接查询
17.4.2. 子查询
17.5. FAQ
17.5.1. adoop.security.authorize.AuthorizationException): User: hadoop is not allowed to impersonate anonymous
18. Apache Sqoop
18.1. 安装 Sqoop
18.2. sqoop2-tool
18.2.1. verify
18.2.2. upgrade
18.3. sqoop2-shell
18.3.1. show version
18.3.2. set
18.3.2.1. server
18.3.2.2. 要设置可查看具体出错信息
18.3.3. show connector
18.3.4. link
18.3.4.1. hdfs-connector
18.3.4.2. generic-jdbc-connector
18.3.5. job
18.3.5.1. create job
18.3.5.2. show job
18.3.5.3. start job
18.3.5.4. status job
18.3.6. update
18.3.6.1. link
18.4. FAQ
18.4.1. Unable to load native-hadoop library for your platform
III. MySQL
19. MySQL Server
19.1. MySQL 安装
19.1.1. CentOS
19.1.1.1. CentOS 8 Stream + dnf 安装 Mysql
19.1.1.2. CentOS 6.2 + MySQL 5.5.25 (RPM)
19.1.1.3. MySQL 8.0
19.1.2. Docker
19.1.3. Ubuntu/Debian
19.1.3.1. mysql-5.5.21-debian6.0-i686.deb
19.1.4. 源码安装
19.1.5. 二进制版本
19.1.6. Installing MySQL on Linux Using the MySQL Yum Repository
19.1.6.1. MySQL 5.6
19.1.6.2. MySQL 5.7
19.1.7. Firewall
19.1.8. Mac OS
19.1.9. MariaDB
19.1.9.1. CentOS 6 YUM 安装 MariaDB
19.1.9.2. CentOS 7 安装 MariaDB
19.1.10. Percona
19.1.10.1. Percona yum Repository
19.1.10.2. Percona XtraBackup
19.1.10.3. Percona Toolkit - MySQL Management Software
19.2. MySQL Plugin
19.2.1. validate_password
19.2.2. MySQL Images manager
19.2.3. MySQL fifo
19.2.4. 内容输出到文本插件
19.3. Replication
19.3.1. Master Slave
19.3.1.1. Master
19.3.1.2. Slave
19.3.1.3. Testing
19.3.1.4. 将现有数据库迁移到主从结构数据库
19.3.1.5. 主从复制安全问题
19.3.2. Master Master(主主)
19.3.2.1. Master A
19.3.2.2. Master B
19.3.2.3. 将Master A 数据库 同步到 Master B 两端数据库内容保持一致
19.3.2.4. Master A - B 同步两端数据库
19.3.2.5. Master A 数据库解除只读权限
19.3.2.6. 查看主主的工作状态
19.3.3. Semisynchronous Replication
19.3.3.1. Master
19.3.3.2. Slave 配置
19.3.3.3. 卸载插件
19.3.3.4. my.cnf
19.3.4. multi-master replication
19.3.5. multi-source replication
19.3.6. 与复制有关的问题
19.3.6.1. 主从不同步问题
19.3.6.2. mysql-bin 清理问题
19.3.6.3. 跳过 Last_Errno
19.3.6.4. 重置Slave
19.3.7. GTID
19.3.7.1. Master
19.3.7.2. Slave
19.4. MySQL Custer
19.4.1. Management node (MGM node)
19.4.2. Data node
19.4.3. SQL node
19.4.4. Starting
19.4.5. Shutdown
19.4.6. Testing
19.5. MySQL Proxy
19.5.1. Ubuntu
19.5.2. CentOS
19.5.2.1. FAQ
19.6. MySQL Router
19.6.1. 安装 MySQL Router
19.6.2. 配置 MySQL Router
19.6.2.1. 主备配置
19.6.2.2. 负载均衡配置
19.6.3. MySQL Router , Haproxy,LVS 的选择
19.7. my.cnf
19.7.1. bind-address
19.7.2. 禁用TCP/IP链接
19.7.3. 配置字符集
19.7.4. 最大链接数 max_connections
19.7.5. 默认引擎 storage-engine
19.7.6. max_allowed_packet
19.7.7. skip-name-resolve
19.7.8. timeout
19.7.9. 与复制有关的参数
19.7.9.1. 用于主库的选项 Master
19.7.9.2. 用于从库的选项 Slave
19.7.9.3. 逃过错误
19.7.10. 与 InnoDB 有关的配置项
19.7.11. EVENT 设置
19.7.12. 日志
19.7.13. MySQL 5.7 my.cnf 实例
19.7.14. Example for my.cnf
19.8. variables
19.8.1. time_zone
19.8.2. sql_mode
19.8.2.1. 设置 sql_mode
19.8.2.2. 查看 sql_mode
19.8.2.3. 兼容早期 MySQL 版本
19.8.2.4. 5.7.16
19.8.3. wait_timeout
19.8.4. table_lock_wait_timeout
19.8.5. low_priority_updates
19.8.6. collation_server
19.8.7. character_set
19.8.8. datadir
19.8.9. plugin_dir
19.8.10. storage_engine
19.8.11. timeout
19.8.12. max_connections
19.8.13. 自动提交 autocommit
19.9. Monitoring
19.9.1. Analysis and Optimization
19.9.1.1. mytop - top like query monitor for MySQL
19.9.1.2. mtop - MySQL terminal based query monitor
19.9.1.3. innotop
19.9.1.4. mysqlreport - A friendly report of important MySQL status values
19.9.1.5. mysqltuner - MySQL configuration assistant
19.9.2. Munin
19.9.3. Cacti
19.9.4. Monitoring MySQL with SNMP
20. Client and Utility Programs
20.1. mysql - the MySQL command-line tool
20.1.1. ~/.my.cnf
20.1.2. 屏幕输出到文件
20.1.3. 终端编码
20.1.4. Unix Socket
20.1.5. 重定向巧用
20.1.6. --sigint-ignore 忽略 Ctrl + C
20.1.7. mysql log
20.2. mysqldump - a database backup program
20.2.1. 备份数据库并压缩文件
20.2.2. 备份数据库/表
20.2.3. 备份到文件
20.2.4. 备份数据库,无结构,只有数据
20.2.5. 使用完整的insert插入数据
20.2.6. --extended-insert / --skip-extended-insert
20.2.7. --skip-lock-tables
20.2.8. --skip-add-locks
20.2.9. --where
20.2.10. 注释信息--comments /--skip-comments
20.2.11. 不导出注释信息
20.2.12. 字符集设置
20.3. mysqladmin - client for administering a MySQL server
20.3.1. reload
20.3.2. 更改密码
20.3.3. status
20.3.4. process list
20.4. myisamchk — MyISAM Table-Maintenance Utility
20.5. mysqlcheck — A Table Maintenance and Repair Program
20.6. mysqlslap - load emulation client
20.7. mysqldumpslow - Parse and summarize the MySQL slow query log.
20.8. mysql-shell
20.9.
20.10. MySQL慢查询日志(Slow Query Log)
20.10.1. MySQL 8.x
20.10.2. MySQL 5.x
20.10.2.1. 查看设置
20.10.2.2. 开启慢查询日志
20.10.2.3. 配置慢查询日志
20.10.2.4. 删除慢查询日志
20.11. mysql-admin
21. 数据库管理(Database Administration)
21.1. 用户管理(User Account Management)
21.1.1. 创建用户
21.1.2. 删除用户
21.1.3. 修改用户名
21.1.4. 修改密码
21.2. Access Privilege System
21.2.1. SHOW GRANTS
21.2.2. show privileges
21.2.3. Grant privileges
21.2.4. Revoke privileges
21.2.5. Show Privileges
21.2.6. MAX_QUERIES_PER_HOUR/MAX_UPDATES_PER_HOUR
21.2.7. Table Privileges
21.2.8. Column Privileges
21.3. 字符集转换
21.3.1. 转换 latin1 到 UTF-8
21.4. 重新整理AUTO_INCREMENT字段
21.5. 数据库内容替换
21.6. Kill 脚本
21.7. MySQL 时区管理
21.8. SHOW COMMAND
21.8.1. 查看版本
21.8.2. status
21.8.2.1. show status
21.8.2.2. show master status
21.8.2.3. show slave status
21.8.2.4. show plugins
21.8.3. show processlist
21.8.4. 线程的使用情况
21.8.5. DATABASES
21.8.6. 排序统计信息
21.8.7. Key 状态
21.8.8. FUNCTION
21.8.9. PROCEDURE
21.8.10. TRIGGERS
21.8.11. EVENTS
21.8.12. 引擎(ENGINES)
21.8.13. 字符集(Collation)
21.8.14. SHOW GRANTS
21.8.15. validate_password
21.9. Maintenance 数据库维护
21.9.1. CHECK 检查表
21.9.2. ANALYZE 分析表
21.9.3. CHECKSUM
21.9.4. OPTIMIZE 优化表
21.9.5. REPAIR 修复
21.10. INFORMATION_SCHEMA
21.10.1. 查询表字段
21.10.2. 列出所有触发器
21.11. Backup and Recovery
21.11.1. Import / Export
21.11.1.1. Export(Backup)
21.11.1.2. Import(Recovery)
21.11.1.3. xml
21.11.1.4. 备份表数据
21.11.1.5. source
21.11.1.6. 使用 mysqlhotcopy 备份 MyISAM 引擎的数据库
21.11.1.7. AutoMySQLBackup
21.11.1.8. xtrabackup - Open source backup tool for InnoDB and XtraDB.
21.11.2. Snapshot Backup
21.11.2.1. LVM Snapshot
21.11.2.2. Btrfs Snapshot
22. DDL - Data Definition Language
22.1. 数据库管理(Database)
22.1.1. create
22.1.2. drop
22.1.3. 修改数据库
22.1.4. Rename
22.1.5. CHARACTER
22.1.6. show create database
22.2. 表管理(Table)
22.2.1. 数据类型
22.2.1.1. SET 集合类型
22.2.2. create table ... select
22.2.3. modifiy table
22.2.4. TEMPORARY Table
22.2.5. Collate
22.2.6. CHARACTER
22.2.7. DEFAULT
22.2.7.1. AUTO_INCREMENT
22.2.7.2. TIMESTAMP NULL DEFAULT NULL ON UPDATE
22.2.7.3. 表存储位置(DATA DIRECTORY)
22.2.8. KEY
22.2.8.1. PRIMARY KEY
22.2.9. AUTO_INCREMENT 定义初始值
22.2.10. COMMENT
22.2.11. Engine 存储引擎
22.2.11.1. 显示当前数据库支持引擎
22.2.11.2. 切换引擎
22.2.11.3. FEDERATED
22.2.11.4. BLACKHOLE
22.2.11.5. ARCHIVE
22.2.11.6. CSV
22.3. Partitioning
22.3.1. RANGE
22.3.2. LIST
22.3.3. HASH
22.3.3.1. LINEAR HASH
22.3.4. KEY分区
22.3.5. Subpartitioning
22.3.6. 分区管理
22.3.6.1. 新增分区
22.3.6.2. 删除分区
22.3.6.3. 重建分区
22.3.6.4. 分区维护
22.3.7. EXPLAIN PARTITIONS
22.3.8. SHOW CREATE TABLE
22.3.9. INFORMATION_SCHEMA.partitions 表
22.3.10. 分区数据操作
22.4. Index
22.4.1. SHOW INDEX
22.4.2. CREATE INDEX
22.4.3. DROP INDEX
22.4.4. rebuild
22.5. 外键(Foreign Key)
22.5.1. FOREIGN KEY (RESTRICT)
22.6. 视图(View)
22.7. 存储过程(PROCEDURE)
22.7.1. 存储程序
22.7.2. EXECUTE 执行 SQL
22.7.3. PREPARE 传递参数
22.7.4. 存储过程返回数据
22.7.5. 结果集转JSON
22.7.6. 例子·过程返回结果
22.8. 函数
22.8.1. TIMESTAMP TO ISO8601
22.9. 触发器(Trigger)
22.9.1. create trigger
22.9.1.1. Update 更新出发
22.9.1.2. Delete 删除出发
22.9.1.3. Insert 插入出发
22.9.2. drop trigger
22.9.3. show triggers
22.9.3.1. SHOW CREATE TRIGGER
22.9.4. EXAMPLE
22.9.4.1. BEFORE/AFTER
22.9.4.2. UUID
22.9.4.3. CALL PROCEDURE
22.10. 事件调度器(EVENT)
22.10.1. 启用 EVENT
22.10.2. 创建 EVENT
22.10.3. 禁用/启用
22.10.4. show events
22.10.5. 实例·每月创建一个表
23. DML (Data Manipulation Language)
23.1. INSERT
23.1.1. INSERT INTO ... SELECT
23.1.2. INSERT IGNORE
23.1.3. INSERT...ON DUPLICATE KEY UPDATE
23.2. REPLACE
23.3. DELETE
23.3.1. 删除重复数据
24. SQL Statement Syntax
24.1. DISTINCT
24.2. group by
24.3. HAVING
24.4. REGEXP
24.5. IN / NOT IN
24.6. ALL / Any
24.7. exists, not exists
24.8. UNION
24.8.1. UNION ALL
24.8.2. 两张表字段不对等解决方法
24.9. OUTFILE/LOAD DATA INFILE
24.9.1. Export data to CSV from MySQL
24.9.2. Import data from CSV file.
24.10. CASE Syntax
24.11. MySQL 专有命令
24.11.1. SQL_NO_CACHE
24.11.2. SIGNAL Syntax
24.12. SQL 92
25. Functions and Operators
25.1. COUNT
25.2. group_concat() 列传行
25.3. UUID()
25.4. String
25.4.1. LEFT/RIGHT
25.4.2. RPAD/LPAD
25.4.3. CONCAT
25.4.4. CONCAT_WS
25.4.5. 链接所有字段
25.4.6. GROUP_CONCAT
25.4.7. replace
25.4.8. SUBSTRING
25.4.9. SUBSTRING_INDEX
25.4.10. AES_ENCRYPT / AES_DECRYPT
25.5. Date and Time
25.5.1. year/month/day hour:minite:second
25.5.2. Unix time
25.5.3. DATE_FORMAT
25.5.4. DATE_SUB/DATE_ADD
25.5.4.1. DATE_ADD
25.5.5. datediff / timediff
25.6. 数值函数
25.6.1. cast 类型转换
25.6.2. truncate 保留小数位数
25.6.3. MOD 求余
25.7. Control Flow Functions
26. DCL (Data Control Language)
26.1. 锁
26.1.1. 共享锁
26.1.2. 排他锁
26.1.3. 锁
26.1.3.1. 表的加锁与解锁
26.1.3.2. 禁止查询
26.1.4. 锁等待与超时
26.1.4.1. 超时设置
26.1.4.2. select for update nowait
26.2. 事务处理和锁定语句
26.2.1. 事务隔离级别
26.2.2. 事务所用到的表
26.2.3. 解决更新冲突
26.2.4. 共享锁
26.2.5. SAVEPOINT
27. Optimization
27.1. Limit 状态
27.2. 使用 Btrfs 文件系统存储mysql数据
27.3. 打开表的数量
27.4. Buffering and Caching
27.4.1. Query Cache SELECT Options
27.5. where 优化
27.6. SHOW PROFILE Syntax SQL性能分析器
27.7. PROCEDURE ANALYSE()
28. MySQL Connectors
28.1. JDBC
28.2. ODBC
28.3. MySQL native driver for PHP - mysqlnd
28.4. python-mysqldb
29. MySQL GUI/Web Manager
29.1. HeidiSQL
29.2. Toad for MySQL Freeware
29.3. phpMyAdmin - MySQL web administration tool
29.4. Maatkit Essential command-line utilities for MySQL
30. Miscellaneous
30.1. Multi-Master Replication Manager for MySQL
30.2. MHA
30.3. HandlerSocket
30.4. Maatkit
30.5. Mroonga
30.6. Amoeba
31. FAQ
31.1. Reset root password 重置MySQL root密码
31.1.1. MySQL 5.7.x
31.1.2. MySQL 8.0
31.2. 查看错误代码
31.2.1. ERROR 1153 (08S01) at line 3168: Got a packet bigger than 'max_allowed_packet' bytes
31.2.2. ERROR 1129 (00000): Host 'XXXXXX' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'
31.3. 临时表是否需要建索引
31.4. [Warning] Changed limits: max_open_files: 5000 (requested 20480)
31.5. SQL Error (1038): Out of sort memory, consider increasing server sort buffer size
31.6. this is incompatible with sql_mode=only_full_group_by
31.7. ERROR 1071 (42000) at line 25: Specified key was too long; max key length is 767 bytes
31.8. ERROR 1086 (HY000): File '/var/lib/mysql-files/order.txt' already exists
31.9. Error Code: 1146. Table 'test.CACHE_UPDATE' doesn't exist
31.10. Error Code: 1175. You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column.
31.11. ERROR 1273 (HY000) at line 3364: Unknown collation: 'utf8mb4_0900_ai_ci'
31.12. ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it cannot execute this statement
31.13. ERROR 1364: 1364: Field 'id' doesn't have a default value
31.14. ERROR 1415: Not allowed to return a result set from a trigger
31.15. ERROR 1503 (HY000): A PRIMARY KEY must include all columns in the table's partitioning function
31.16. ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
31.17. ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
31.18. ERROR 1840 (HY000) at line 24: @@GLOBAL.GTID_PURGED can only be set when @@GLOBAL.GTID_EXECUTED is empty.
31.19. ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'
31.20. ERROR 2013 (HY000): Lost connection to MySQL server during query
31.21. ERROR 3024 (HY000): Query execution was interrupted, maximum statement execution time exceeded
31.22. Authentication plugin 'caching_sha2_password' cannot be loaded: /usr/lib64/mysql/plugin/caching_sha2_password.so: cannot open shared object file: No such fileor directory
31.23. com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Public Key Retrieval is not allowed
31.24. mysqldump: Couldn't execute 'SELECT COLUMN_NAME,
31.25. this is incompatible with sql_mode=only_full_group_by
31.26. mysqldump: [Warning] Using a password on the command line interface can be insecure.
31.27. mysql: [Warning] Using a password on the command line interface can be insecure.
IV. Redis
32. Redis 安装
32.1. CentOS 8 Stream
32.2. CentOS 7
32.3. CentOS 6
32.3.1. 主从同步
32.3.2. Sentinel
32.4. Ubuntu
32.5. Mac 安装 Redis
32.6. 源码编译安装
32.7.
32.8. Test Redis
33. /etc/redis.conf
33.1. 密码认证
33.2. maxmemory-policy TTL 过期策略配置
34. redis-cli - Command-line client to redis-server
34.1. 命令参数
34.1.1. password
34.1.2. raw
34.2. --latency Enter a special mode continuously sampling latency.
34.3. 清空指定数据库
34.4. auth
34.5. MONITOR
34.6. info
34.7. save/bgsave/lastsave
34.8. config
34.9. keys
34.10. 字符串操作
34.10.1. set/get/del
34.10.2. setnx
34.11. expire/ttl
34.12. 获取 key 类型
34.13. LIST 数据类型
34.14. set 无序字符集合
34.15. zset (有序集合)
34.16. Pub/Sub 订阅与发布
34.17. flushdb 清空 Redis 数据
35. redis-benchmark 测试工具
36. Redis Cluster
37. Redis 通信协议
37.1. 切换DB
37.2. 监控
38. Redis 开发
38.1. 消息订阅与发布
39. 工具
39.1. 导出 / 导入
39.2. phpRedisAdmin
39.3. A fast, light-weight proxy for memcached and redis
40. FAQ
40.1. 清空数据库
40.2. (error) MISCONF Redis is configured to save RDB snapshots
V. MongoDB
41. Install 安装MongoDB
41.1. CentOS 8 Stream
41.2. MacOS 安装 MongoDB
41.3. 二进制tar包安装
41.4. Ubuntu MongoDB
41.5. CentOS 7 MongoDB
41.6. 从官网安装最新版本的 MongoDB 3.4
41.6.1. Server
41.6.2. Client
41.6.3. 工具
41.7. MongoDB + Hadoop
41.8. OSCM 一键安装 MongoDB 4.0.2
41.9. Replication
41.10. Drivers
41.10.1. Using MongoDB in PHP
42. MongoDB 管理
42.1. Security and Authentication
42.1.1. 超级管理员
42.1.2. 数据库访问用户
42.1.3. 数据库监控用户
42.1.4. 删除用户
42.1.5. 更新角色
42.2. 4.0早期旧版本
43. 命令工具
43.1. mongo - MongoDB Shell
43.1.1. eval
43.1.2. help
43.1.3. 登陆认证
43.1.4. 管道操作
43.2. mongodump - Backup
43.2.1. 本地备份
43.2.2. 远程备份
43.3. mongorestore
43.3.1. 本地恢复
43.3.2. 远程恢复
43.3.3. filter
43.4. mongostat
43.5. mongotop
43.6. mongofiles - Browse and modify a GridFS filesystem.
43.6.1. list 浏览文件
43.6.2. put 上传文件
43.6.3. get 下载
43.6.4. delete 删除
44. MongoDB Shell
44.1. shutdownServer
44.2. show 查看命令
44.2.1. show dbs
44.2.2. show collections
44.2.3. show users
44.2.4. show profile
44.3. 切换数据库
44.4. Collection 管理
44.4.1. 创建 Collection
44.4.2. 删除 collection
44.4.3. 删除字段
44.5. save
44.6. insert
44.7. update
44.7.1. multi 更新所有数据
44.7.2. upsert 更新,如果不存在则插入数据
44.7.3. updateMany 更新集合中的所有数据
44.8. remove
44.8.1. 删除条件使用 _id
44.9. count()
44.10. 查询
44.10.1. find() MongoDB 2.x
44.10.2. find() MongoDB 3.x
44.10.2.1. Query
44.10.2.2. 包含字段
44.10.2.3. 排除字段
44.10.2.4. sort()
44.10.3. group()
44.11. aggregate
44.11.1. project
44.11.1.1. $split
44.11.1.2. substr
44.11.2. groupby + sum
44.12. Indexes 索引
44.12.1. 查看索引
44.12.2. 创建索引
44.12.3. 删除索引
44.12.4. 唯一索引
44.12.5. 复合索引
44.12.6. 稀疏索引
44.13. Map-Reduce
44.13.1. 使用 Map-Reduce 统计Web 服务器 access.log 日志文件
44.14. 内嵌对象
44.14.1. Array / List 列表类型
44.15. Javascript 脚本
45. Mongo Admin UI
45.1. RockMongo
45.2. MongoVUE
46. Cassandra
46.1. Getting Started
46.1.1. Downloading and Installation
46.1.2. Running Cassandra
46.1.3. cli tool
46.1.4. Testing Cassandra
46.2. Configure Cassandra
46.2.1. Envionment variables
46.2.2. log4j.properties
46.2.3. storage-conf.xml
46.3. Keyspace
46.3.1. Schema
46.3.1.1. Keyspace
46.3.1.2. Column family
46.3.1.2.1. Name
46.3.1.2.2. Column
46.3.1.2.3. Super column
46.3.1.2.4. Sorting
46.3.2. Keyspace example
46.4. Cluster
46.4.1. Running a cluster
46.4.2. Running a single node
46.4.3. nodetool
47. Hypertable
47.1. Hypertable 安装
47.1.1. Hypertable standalone 单机安装
47.1.2. Hypertable on HDFS(hadoop) 安装
47.1.3. MapR
47.1.4. Ceph
47.1.5. 检验安装
47.2. Code examples
47.2.1. PHP
47.3. HQL
47.3.1. namespace 命名空间管理
47.3.2. Table 表
47.4. FAQ
47.4.1. 切换 DFS Broker
48. CouchBase
48.1. 安装 CouchBase
48.1.1. Getting Started with Couchbase on PHP
48.2. couchbase 命令
48.2.1. couchbase-cli
49. Memcached
49.1. 安装 Memcached
49.1.1. CentOS 下编译
49.1.2. Ubuntu 下编译安装
49.1.3. debian/ubuntu
49.1.4. yum install
49.1.4.1. CentOS 6.x
49.1.4.2. CentOS 7.x
49.2. Memcached 代理
49.2.1. moxi
49.2.2. memagent
50. RethinkDB
51. TokyoCabinet/Tyrant
52. Flare
53. Voldemort
54. LevelDB
55. HyperDex
56. LeoFS
VI. PostgreSQL
57. PostgreSQL 安装
57.1. Ubuntu 12.04.1 LTS 安装
57.2. YUM 默认源安装
57.3. PostgreSQL 官方 YUM 源安装
57.3.1. 9.2
57.3.2. 9.3
57.3.3. 9.4
57.3.4. 9.6
57.3.5. PostgreSQL 10
57.4. PostgreSQL 配置
57.4.1. postgresql.conf
57.4.2. pg_hba.conf
57.5. 创建dba用户
58. 数据库管理(Database Administration)
58.1. 用户管理(User Account Management)
58.1.1. 创建用户
58.1.2. 删除用户
58.1.3. 修改用户名
58.1.4. 修改密码
58.2. Access Privilege System
58.2.1. SHOW GRANTS
58.2.2. show privileges
58.2.3. Grant privileges
58.2.4. Revoke privileges
58.2.5. Show Privileges
58.2.6. MAX_QUERIES_PER_HOUR/MAX_UPDATES_PER_HOUR
58.2.7. Table Privileges
58.2.8. Column Privileges
58.3. 字符集转换
58.3.1. 转换 latin1 到 UTF-8
58.4. 重新整理AUTO_INCREMENT字段
58.5. 数据库内容替换
58.6. Kill 脚本
58.7. MySQL 时区管理
58.8. SHOW COMMAND
58.8.1. 查看版本
58.8.2. status
58.8.2.1. show status
58.8.2.2. show master status
58.8.2.3. show slave status
58.8.2.4. show plugins
58.8.3. show processlist
58.8.4. 线程的使用情况
58.8.5. DATABASES
58.8.6. 排序统计信息
58.8.7. Key 状态
58.8.8. FUNCTION
58.8.9. PROCEDURE
58.8.10. TRIGGERS
58.8.11. EVENTS
58.8.12. 引擎(ENGINES)
58.8.13. 字符集(Collation)
58.8.14. SHOW GRANTS
58.8.15. validate_password
58.9. Maintenance 数据库维护
58.9.1. CHECK 检查表
58.9.2. ANALYZE 分析表
58.9.3. CHECKSUM
58.9.4. OPTIMIZE 优化表
58.9.5. REPAIR 修复
58.10. INFORMATION_SCHEMA
58.10.1. 查询表字段
58.10.2. 列出所有触发器
58.11. Backup and Recovery
58.11.1. Import / Export
58.11.1.1. Export(Backup)
58.11.1.2. Import(Recovery)
58.11.1.3. xml
58.11.1.4. 备份表数据
58.11.1.5. source
58.11.1.6. 使用 mysqlhotcopy 备份 MyISAM 引擎的数据库
58.11.1.7. AutoMySQLBackup
58.11.1.8. xtrabackup - Open source backup tool for InnoDB and XtraDB.
58.11.2. Snapshot Backup
58.11.2.1. LVM Snapshot
58.11.2.2. Btrfs Snapshot
59. PostgreSQL 命令
59.1. psql - PostgreSQL interactive terminal
59.1.1. 执行文件
59.2. Backup / Restore
59.2.1. Backup
59.2.2. Restore
59.2.3. import
59.2.4. 导出指定 schema
59.2.5. PostgreSQL for windows
59.2.6. 大型数据库备份
59.2.7. schema之间迁移数据
60. DDL - Data Definition Language
60.1. 数据库管理(Database)
60.1.1. create
60.1.2. drop
60.1.3. 修改数据库
60.1.4. Rename
60.1.5. CHARACTER
60.1.6. show create database
60.2. 表管理(Table)
60.2.1. 数据类型
60.2.1.1. SET 集合类型
60.2.2. create table ... select
60.2.3. modifiy table
60.2.4. TEMPORARY Table
60.2.5. Collate
60.2.6. CHARACTER
60.2.7. DEFAULT
60.2.7.1. AUTO_INCREMENT
60.2.7.2. TIMESTAMP NULL DEFAULT NULL ON UPDATE
60.2.7.3. 表存储位置(DATA DIRECTORY)
60.2.8. KEY
60.2.8.1. PRIMARY KEY
60.2.9. AUTO_INCREMENT 定义初始值
60.2.10. COMMENT
60.2.11. Engine 存储引擎
60.2.11.1. 显示当前数据库支持引擎
60.2.11.2. 切换引擎
60.2.11.3. FEDERATED
60.2.11.4. BLACKHOLE
60.2.11.5. ARCHIVE
60.2.11.6. CSV
60.3. Partitioning
60.3.1. RANGE
60.3.2. LIST
60.3.3. HASH
60.3.3.1. LINEAR HASH
60.3.4. KEY分区
60.3.5. Subpartitioning
60.3.6. 分区管理
60.3.6.1. 新增分区
60.3.6.2. 删除分区
60.3.6.3. 重建分区
60.3.6.4. 分区维护
60.3.7. EXPLAIN PARTITIONS
60.3.8. SHOW CREATE TABLE
60.3.9. INFORMATION_SCHEMA.partitions 表
60.3.10. 分区数据操作
60.4. Index
60.4.1. SHOW INDEX
60.4.2. CREATE INDEX
60.4.3. DROP INDEX
60.4.4. rebuild
60.5. 外键(Foreign Key)
60.5.1. FOREIGN KEY (RESTRICT)
60.6. 视图(View)
60.7. 存储过程(PROCEDURE)
60.7.1. 存储程序
60.7.2. EXECUTE 执行 SQL
60.7.3. PREPARE 传递参数
60.7.4. 存储过程返回数据
60.7.5. 结果集转JSON
60.7.6. 例子·过程返回结果
60.8. 函数
60.8.1. TIMESTAMP TO ISO8601
60.9. 触发器(Trigger)
60.9.1. create trigger
60.9.1.1. Update 更新出发
60.9.1.2. Delete 删除出发
60.9.1.3. Insert 插入出发
60.9.2. drop trigger
60.9.3. show triggers
60.9.3.1. SHOW CREATE TRIGGER
60.9.4. EXAMPLE
60.9.4.1. BEFORE/AFTER
60.9.4.2. UUID
60.9.4.3. CALL PROCEDURE
60.10. 事件调度器(EVENT)
60.10.1. 启用 EVENT
60.10.2. 创建 EVENT
60.10.3. 禁用/启用
60.10.4. show events
60.10.5. 实例·每月创建一个表
61. DML (Data Manipulation Language)
61.1. INSERT
61.1.1. INSERT INTO ... SELECT
61.1.2. INSERT IGNORE
61.1.3. INSERT...ON DUPLICATE KEY UPDATE
61.2. REPLACE
61.3. DELETE
61.3.1. 删除重复数据
62. SQL Statement Syntax
62.1. DISTINCT
62.2. group by
62.3. HAVING
62.4. REGEXP
62.5. IN / NOT IN
62.6. ALL / Any
62.7. exists, not exists
62.8. UNION
62.8.1. UNION ALL
62.8.2. 两张表字段不对等解决方法
62.9. OUTFILE/LOAD DATA INFILE
62.9.1. Export data to CSV from MySQL
62.9.2. Import data from CSV file.
62.10. CASE Syntax
62.11. MySQL 专有命令
62.11.1. SQL_NO_CACHE
62.11.2. SIGNAL Syntax
62.12. SQL 92
63. Functions and Operators
63.1. COUNT
63.2. group_concat() 列传行
63.3. UUID()
63.4. String
63.4.1. LEFT/RIGHT
63.4.2. RPAD/LPAD
63.4.3. CONCAT
63.4.4. CONCAT_WS
63.4.5. 链接所有字段
63.4.6. GROUP_CONCAT
63.4.7. replace
63.4.8. SUBSTRING
63.4.9. SUBSTRING_INDEX
63.4.10. AES_ENCRYPT / AES_DECRYPT
63.5. Date and Time
63.5.1. year/month/day hour:minite:second
63.5.2. Unix time
63.5.3. DATE_FORMAT
63.5.4. DATE_SUB/DATE_ADD
63.5.4.1. DATE_ADD
63.5.5. datediff / timediff
63.6. 数值函数
63.6.1. cast 类型转换
63.6.2. truncate 保留小数位数
63.6.3. MOD 求余
63.7. Control Flow Functions
64. PostgreSQL GUI
64.1. pgAdmin III
64.2. phpPgAdmin
64.3. Monitoring
64.3.1. PgBadger
64.4. pgModeler - PostgreSQL Database Modeler
65. Barman Backup & recovery for PostgreSQL
66. pgbouncer - lightweight connection pooler for PostgreSQL
66.1. 安装 pgbouncer
66.1.1. Ubuntu
66.1.2. CentOS
66.2. 配置 pgbouncer
67. Foreign data wrappers
68. Barman for PostgreSQL
69. Connector
69.1. Pomm
70. Replication
70.1. Bucardo
71. FAQ
71.1. Reset root password 重置MySQL root密码
71.1.1. MySQL 5.7.x
71.1.2. MySQL 8.0
71.2. 查看错误代码
71.2.1. ERROR 1153 (08S01) at line 3168: Got a packet bigger than 'max_allowed_packet' bytes
71.2.2. ERROR 1129 (00000): Host 'XXXXXX' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'
71.3. 临时表是否需要建索引
71.4. [Warning] Changed limits: max_open_files: 5000 (requested 20480)
71.5. SQL Error (1038): Out of sort memory, consider increasing server sort buffer size
71.6. this is incompatible with sql_mode=only_full_group_by
71.7. ERROR 1071 (42000) at line 25: Specified key was too long; max key length is 767 bytes
71.8. ERROR 1086 (HY000): File '/var/lib/mysql-files/order.txt' already exists
71.9. Error Code: 1146. Table 'test.CACHE_UPDATE' doesn't exist
71.10. Error Code: 1175. You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column.
71.11. ERROR 1273 (HY000) at line 3364: Unknown collation: 'utf8mb4_0900_ai_ci'
71.12. ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it cannot execute this statement
71.13. ERROR 1364: 1364: Field 'id' doesn't have a default value
71.14. ERROR 1415: Not allowed to return a result set from a trigger
71.15. ERROR 1503 (HY000): A PRIMARY KEY must include all columns in the table's partitioning function
71.16. ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
71.17. ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
71.18. ERROR 1840 (HY000) at line 24: @@GLOBAL.GTID_PURGED can only be set when @@GLOBAL.GTID_EXECUTED is empty.
71.19. ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'
71.20. ERROR 2013 (HY000): Lost connection to MySQL server during query
71.21. ERROR 3024 (HY000): Query execution was interrupted, maximum statement execution time exceeded
71.22. Authentication plugin 'caching_sha2_password' cannot be loaded: /usr/lib64/mysql/plugin/caching_sha2_password.so: cannot open shared object file: No such fileor directory
71.23. com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Public Key Retrieval is not allowed
71.24. mysqldump: Couldn't execute 'SELECT COLUMN_NAME,
71.25. this is incompatible with sql_mode=only_full_group_by
71.26. mysqldump: [Warning] Using a password on the command line interface can be insecure.
71.27. mysql: [Warning] Using a password on the command line interface can be insecure.
VII. Oracle
72. Oracle 12c 安装可
72.1. Server 安装
72.2. Desktop 安装
72.3. Oracle Net Services Configuration
72.3.1. Listener configuration
72.3.2. Local Net Service Name configuration
72.4. Oracle 12c Client for Windows 10
72.5. 卸载 Oracle
72.6. Linux 安装 sqlplus
73. Privilege
73.1. Account
73.1.1. show user
73.1.2. DEFAULT_TABLESPACE
73.1.3. unlock/lock
73.2. User
73.2.1. Create user
73.2.2. Drop user
73.2.3. Alter user
73.2.4. 修改密码
73.2.5. Reset Password 忘记密码重置密码
73.3. grant
73.3.1. 列出权限
73.3.2. 查看用户权限
73.3.3. 吊销权限
73.3.4. System Privileges 系统权限
73.3.4.1. EM 权限
73.3.4.2. Granting and Revoking SYSDBA and SYSOPER Privileges
73.3.5. Object Privileges 对象权限
73.4. Opening the Encrypted Wallet
74. 数据库管理
74.1. lsnrctl
74.2. listener.ora
74.3. TNS 配置
74.3.1. HOST
74.3.2. SID
74.4. parameter
74.4.1. db
74.4.2. instance_name
74.4.3. service_name
74.4.4. global_name
74.4.5. db_name
74.4.6. db_domain
74.4.7. sga
74.4.8. size
74.4.9. spfile
74.4.10. cache
74.4.11. Character Set
74.5. 进程
74.6. 查看用户
74.7. 显示表
74.8. 显示试图
74.9. PROCEDURE
74.10. FUNCTION
74.11. 视图、存储过程、函数
74.12. 查看存储过程源代码
74.13. 日期时间格式
74.13.1. Date
74.13.2. 修改系统日期格式
74.13.3. TIMESTAMP
74.13.4.
74.14. 切换字符集
74.14.1. 切换到 GBK
74.14.2. 切到 UTF-8
74.14.3. 切到 AL32UTF8
74.14.4. 切换过程实例
74.15. Oracle 表空间
74.15.1. 查询空闲表空间
74.15.2. 创建表空间
74.15.2.1. 临时表空间
74.15.3. 更改表空间属性
74.15.3.1. 修改表空间大小
74.15.4. 删除表空间
75. Oracle Gui
75.1. Create instance
75.2. Oracle Net Configuration Assistant
75.3. Oracle Enterprise Manager
75.3.1. EM Configuration issue. /opt/oracle/product/11.2.0/dbhome_1/orcl.example.com_orcl not found.
75.4. Other GUI - phpOraAdmin
76. CLI
76.1. SQL*Plus
76.1.1. conn
76.1.2. startup/shutdown
76.1.2.1. startup
76.1.2.2. shutdown
76.1.3. $ORACLE_HOME/sqlplus/admin/glogin.sql
76.1.4. @运行SQL
76.1.5. 链接数据库
76.2. exp/imp
76.2.1. exp
76.2.2. imp
76.2.2.1. A用户导出B用户导入
76.3. expdp/impdp
76.3.1. expdp
76.3.2. impdp
76.3.3. 数据泵演示
76.3.4. 查看dmp文件的表空间
76.4. RMAN
76.4.1. 数据库模式
76.4.2. 完全备份
76.4.3. 增量备份
76.4.4. 恢复数据库
76.4.5. 是用tar打包rman文件
76.4.6. 打包 rman 备份文件
77. DDL
77.1. 字段类型
77.1.1. Date
77.1.2. TIMESTAMP
77.2. 索引
77.3. 表
77.3.1.
77.3.2. 约束检查
77.4. SEQUENCE 序列
77.4.1.
78. 程序包
78.1. 执行包中的过程
79. 数据库链接
80. Oracle 监控
80.1. Oracle日志的路径
80.2. SQL 日志监控
80.2.1. 查询性能分析
80.2.2. IO性能分析
80.3. session
80.4. SQL Monitoring Report
81. Installing Oracle Database
81.1. Installing Oracle Database 10g Release 2 on Linux x86
81.2. 11gR2
81.3. Installing Oracle Client 11g
81.4. Silence Install - Database
81.4.1. Response File
81.4.2. OS 配置脚本
81.4.3. 运行 runInstaller
81.5. Silence Install - Client
81.6. oracle 817 script
81.7. Script for automatic startup on boot
81.8. Run level shell script to start Oracle 10g services on RedHat Enterprise Linux (RHAS 4)
82. FAQ
82.1. Reset root password 重置MySQL root密码
82.1.1. MySQL 5.7.x
82.1.2. MySQL 8.0
82.2. 查看错误代码
82.2.1. ERROR 1153 (08S01) at line 3168: Got a packet bigger than 'max_allowed_packet' bytes
82.2.2. ERROR 1129 (00000): Host 'XXXXXX' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'
82.3. 临时表是否需要建索引
82.4. [Warning] Changed limits: max_open_files: 5000 (requested 20480)
82.5. SQL Error (1038): Out of sort memory, consider increasing server sort buffer size
82.6. this is incompatible with sql_mode=only_full_group_by
82.7. ERROR 1071 (42000) at line 25: Specified key was too long; max key length is 767 bytes
82.8. ERROR 1086 (HY000): File '/var/lib/mysql-files/order.txt' already exists
82.9. Error Code: 1146. Table 'test.CACHE_UPDATE' doesn't exist
82.10. Error Code: 1175. You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column.
82.11. ERROR 1273 (HY000) at line 3364: Unknown collation: 'utf8mb4_0900_ai_ci'
82.12. ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it cannot execute this statement
82.13. ERROR 1364: 1364: Field 'id' doesn't have a default value
82.14. ERROR 1415: Not allowed to return a result set from a trigger
82.15. ERROR 1503 (HY000): A PRIMARY KEY must include all columns in the table's partitioning function
82.16. ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
82.17. ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
82.18. ERROR 1840 (HY000) at line 24: @@GLOBAL.GTID_PURGED can only be set when @@GLOBAL.GTID_EXECUTED is empty.
82.19. ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'
82.20. ERROR 2013 (HY000): Lost connection to MySQL server during query
82.21. ERROR 3024 (HY000): Query execution was interrupted, maximum statement execution time exceeded
82.22. Authentication plugin 'caching_sha2_password' cannot be loaded: /usr/lib64/mysql/plugin/caching_sha2_password.so: cannot open shared object file: No such fileor directory
82.23. com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Public Key Retrieval is not allowed
82.24. mysqldump: Couldn't execute 'SELECT COLUMN_NAME,
82.25. this is incompatible with sql_mode=only_full_group_by
82.26. mysqldump: [Warning] Using a password on the command line interface can be insecure.
82.27. mysql: [Warning] Using a password on the command line interface can be insecure.
83. 数据库迁移
83.1. MySQL to PostgreSQL

表格清单

26.1. 更新丢失演示
26.2. 防止更新丢失加锁演示

范例清单

8.1. Elasticsearch master / slave
9.1. Solr - schema.xml
9.2. /etc/profile.d/java.sh
19.1. MySQL 8 创建root账号
19.2. my.cnf
19.3. my.cnf
19.4. my.cnf
22.1. BEFORE/AFTER
22.2. uuid()
24.1. SQL ANY example
27.1. SQL_CACHE 测试
27.2. SHOW PROFILE Syntax
41.1. MongoDB Test
41.2. Using MongoDB in PHP
46.1. Twitter
46.2. Twissandra
49.1. /etc/init.d/memcached
57.1. Example for /var/lib/pgsql/10/data/pg_hba.conf
60.1. BEFORE/AFTER
60.2. uuid()
62.1. SQL ANY example
66.1. /etc/pgbouncer/pgbouncer.ini
74.1. Oracle 字符集切换实例
74.2. 创建表空间实例
76.1. expdp
76.2. impdp
76.3. full backup
77.1.
79.1. DB LINK