日期:2014-05-16  浏览次数:20430 次

面对一个全新的环境,作为一个Mysql DBA,首先应该了解什么

面对一个全新的环境,作为一个Mysql DBA,首先应该了解什么?


前段时间有高人写了一篇《面对一个全新的环境,作为一个Oracle DBA,首先应该了解什么》,本文借花献佛,总结了一些思路,如何面对

一个全新的Mysql环境。

1、先要了解当前的Mysql数据库的版本和平台以及字符集等相关信息


mysql> status
--------------
mysql  Ver 14.14 Distrib 5.1.34, for unknown-linux-gnu (x86_64) using  EditLine wrapper

Connection id:                25874330
Current database:      
Current user:              
SSL:                        Not in use
Current pager:                stdout
Using outfile:                ''
Using delimiter:        ;
Server version:                5.1.34-log Source distribution
Protocol version:        10
Connection:                Localhost via UNIX socket
Server characterset:        utf8
Db     characterset:        utf8
Client characterset:        utf8
Conn.  characterset:        utf8
UNIX socket:                /tmp/mysql.sock
Uptime:                        13 days 14 hours 18 min 36 sec

Threads: 7  Questions: 190708290  Slow queries: 19  Opens: 57835  Flush tables: 1  Open tables: 84  Queries per second avg:

162.344
--------------
2、其次要了解你的数据库中支持哪些存储引擎,5.1的话顺便查下插件情况。


mysql> show engines;
+------------+---------+----------------------------+--------------+------+------------+
| Engine     | Support | Comment                                                        | Transactions | XA   | Savepoints |
+------------+---------+----------------------------+--------------+------+------------+
| InnoDB     | YES     | Supports transactions, row-level locking, and foreign keys     | YES          | YES  | YES        |
| MRG_MYISAM | YES     | Collection of identical MyISAM tables                          | NO           | NO   | NO         |
| BLACKHOLE  | YES     | /dev/null storage engine (anything you write to it disappears) | NO           | NO   | NO         |
| CSV      &nbs