天天看点

第 1 章 MySQL Server

目录

<dl></dl>

<dt>1.1. MySQL Installation</dt>

<dd><dl></dl></dd>

<dt>1.1.1. Installation by apt-get under debian/ubuntu</dt>

<dt>1.1.2. Installation by source code</dt>

<dt>1.1.3. MySQL binary distribution</dt>

<dt>1.1.4. mysql-5.5.21-debian6.0-i686.deb</dt>

<dt>1.1.5. CentOS 6.2 + MySQL 5.5.25 (RPM)</dt>

<dt>1.1.6. mysql-admin</dt>

<dt>1.1.7. Installing MySQL on Linux Using the MySQL Yum Repository</dt>

<dt>1.1.7.1. MySQL 5.6</dt>

<dt>1.1.7.2. MySQL 5.7</dt>

<dt>1.1.8. Mac</dt>

<dt>1.1.9. Firewall</dt>

<dt>1.1.10. Limit 状态</dt>

<dt>1.1.11. 使用 Btrfs 文件系统存储mysql数据</dt>

<dt>1.1.12. Mac OS</dt>

<dt>1.2. MariaDB</dt>

<dt>1.2.1. CentOS YUM 安装 MariaDB</dt>

<dt>1.2.2. MariaDB Audit Plugin</dt>

<dt>1.3. Percona</dt>

<dt>1.3.1. Percona yum Repository</dt>

<dt>1.3.2. Percona XtraBackup</dt>

<dt>1.3.2.1. 安装 XtraBackup</dt>

<dt>1.3.2.2. innobackupex</dt>

<dt>1.3.2.2.1. 备份数据库</dt>

<dt>1.3.2.2.2. 恢复数据库</dt>

<dt>1.3.2.3. xbstream</dt>

<dt>1.3.2.4. xtrabackup</dt>

<dt>1.3.3. Percona Toolkit - MySQL Management Software</dt>

<dt>1.4. my.cnf</dt>

<dt>1.4.1. bind-address</dt>

<dt>1.4.2. 禁用TCP/IP链接</dt>

<dt>1.4.3. 配置字符集</dt>

<dt>1.4.4. 最大链接数 max_connections</dt>

<dt>1.4.5. 默认引擎 storage-engine</dt>

<dt>1.4.6. max_allowed_packet</dt>

<dt>1.4.7. skip-name-resolve</dt>

<dt>1.4.8. timeout</dt>

<dt>1.4.9. 与复制有关的参数</dt>

<dt>1.4.9.1. 用于主库的选项 Master</dt>

<dt>1.4.9.2. 用于从库的选项 Slave </dt>

<dt>1.4.9.3. 逃过错误</dt>

<dt>1.4.10. 与 InnoDB 有关的配置项</dt>

<dt>1.4.11. EVENT 设置</dt>

<dt>1.4.12. 日志</dt>

<dt>1.4.13. MySQL 5.7 my.cnf 实例</dt>

<dt>1.4.14. Example for my.cnf</dt>

<dt>1.5. MySQL Plugin</dt>

<dt>1.5.1. validate_password</dt>

<dt>1.5.2. MySQL Images manager</dt>

<dt>1.5.3. MySQL fifo</dt>

<dt>1.5.4. 内容输出到文本插件</dt>

<dt>1.6. Replication</dt>

<dt>1.6.1. Master Slave</dt>

<dt>1.6.1.1. Master</dt>

<dt>1.6.1.2. Slave</dt>

<dt>1.6.1.3. Testing</dt>

<dt>1.6.1.4. 将现有数据库迁移到主从结构数据库</dt>

<dt>1.6.1.5. 主从复制安全问题</dt>

<dt>1.6.2. Master Master(主主)</dt>

<dt>1.6.2.1. Master A</dt>

<dt>1.6.2.2. Master B</dt>

<dt>1.6.2.3. 将Master A 数据库 同步到 Master B 两端数据库内容保持一致</dt>

<dt>1.6.2.4. Master A - B 同步两端数据库</dt>

<dt>1.6.2.5. Master A 数据库解除只读权限</dt>

<dt>1.6.2.6. 查看主主的工作状态</dt>

<dt>1.6.3. Semisynchronous Replication</dt>

<dt>1.6.3.1. Master</dt>

<dt>1.6.3.2. Slave 配置</dt>

<dt>1.6.3.3. 卸载插件</dt>

<dt>1.6.3.4. my.cnf</dt>

<dt>1.6.4. multi-master replication</dt>

<dt>1.6.5. multi-source replication</dt>

<dt>1.6.6. 与复制有关的问题</dt>

<dt>1.6.6.1. 主从不同步问题</dt>

<dt>1.6.6.2. mysql-bin 清理问题</dt>

<dt>1.6.6.3. 跳过 Last_Errno</dt>

<dt>1.6.6.4. 重置Slave</dt>

<dt>1.6.7. GTID</dt>

<dt>1.6.7.1. Master</dt>

<dt>1.6.7.2. Slave</dt>

<dt>1.7. MySQL Custer</dt>

<dt>1.7.1. Management node (MGM node)</dt>

<dt>1.7.2. Data node</dt>

<dt>1.7.3. SQL node</dt>

<dt>1.7.4. Starting</dt>

<dt>1.7.5. Shutdown</dt>

<dt>1.7.6. Testing</dt>

<dt>1.8. MySQL Proxy</dt>

<dt>1.8.1. Ubuntu</dt>

<dt>1.8.2. CentOS</dt>

<dd><dl><dt>1.8.2.1. FAQ</dt></dl></dd>

<dt>1.9. MySQL Router</dt>

<dt>1.9.1. 安装 MySQL Router</dt>

<dt>1.9.2. 配置 MySQL Router</dt>

<dt>1.9.2.1. 主备配置</dt>

<dt>1.9.2.2. 负载均衡配置</dt>

<dt>1.9.3. MySQL Router , Haproxy,LVS 的选择</dt>

<dt>1.10. SHOW COMMAND</dt>

<dt>1.10.1. 查看版本</dt>

<dt>1.10.2. status</dt>

<dt>1.10.2.1. show status</dt>

<dt>1.10.2.2. show master status</dt>

<dt>1.10.2.3. show slave status</dt>

<dt>1.10.2.4. show plugins</dt>

<dt>1.10.3. show processlist</dt>

<dt>1.10.4. variables</dt>

<dt>1.10.4.1. time_zone</dt>

<dt>1.10.4.2. sql_mode</dt>

<dt>1.10.4.2.1. 设置 sql_mode</dt>

<dt>1.10.4.2.2. 查看 sql_mode</dt>

<dt>1.10.4.2.3. 兼容早起 MySQL 版本</dt>

<dt>1.10.4.2.4. 5.7.16</dt>

<dt>1.10.4.3. wait_timeout</dt>

<dt>1.10.4.4. table_lock_wait_timeout</dt>

<dt>1.10.4.5. low_priority_updates</dt>

<dt>1.10.4.6. character_set</dt>

<dt>1.10.4.7. datadir</dt>

<dt>1.10.4.8. plugin_dir</dt>

<dt>1.10.4.9. storage_engine</dt>

<dt>1.10.4.10. timeout</dt>

<dt>1.10.4.11. max_connections</dt>

<dt>1.10.5. binary 日志</dt>

<dt>1.10.6. 线程的使用情况</dt>

<dt>1.10.7. DATABASES</dt>

<dt>1.10.8. TABLE</dt>

<dt>1.10.9. 临时表</dt>

<dt>1.10.10. 排序统计信息</dt>

<dt>1.10.11. Key 状态</dt>

<dt>1.10.12. FUNCTION</dt>

<dt>1.10.13. PROCEDURE</dt>

<dt>1.10.14. TRIGGERS</dt>

<dt>1.10.15. EVENTS</dt>

<dt>1.10.16. 引擎(ENGINES)</dt>

<dt>1.10.17. 字符集(Collation)</dt>

<dt>1.10.18. SHOW GRANTS</dt>

<dt>1.11. Monitoring</dt>

<dt>1.11.1. Analysis and Optimization</dt>

<dt>1.11.1.1. mytop - top like query monitor for MySQL</dt>

<dt>1.11.1.2. mtop - MySQL terminal based query monitor</dt>

<dt>1.11.1.3. innotop</dt>

<dt>1.11.1.4. mysqlreport - A friendly report of important MySQL status values</dt>

<dt>1.11.1.5. mysqltuner - MySQL configuration assistant</dt>

<dt>1.11.2. Munin</dt>

<dt>1.11.3. Cacti</dt>

<dt>1.11.4. Monitoring MySQL with SNMP</dt>

http://downloads.mysql.com/archives.php

安装环境 ubuntu 8.10

New password for the MySQL "root" user

Repeat password for the MySQL "root" user

create database

配置文件样本

/usr/local/$MYSQL_DIR/bin/mysql_install_db

other option

install core database

set root's password

test

准备下面的软件包

使用 yum 本地安装 rpm, yum 可以帮你解决依赖于冲突

运行mysql-admin

运行 mysql-query-browser

http://dev.mysql.com/doc/mysql-repo-excerpt/5.6/en/linux-installation-yum-repo.html

安装MySQL Server

修改root密码

安全设置向导

MySQL 5.7 会随机分配一个密码给用户

登陆后修改密码

安装

启动

iptables

原文出处:Netkiller 系列 手札

本文作者:陈景峯

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