FATAL ERROR: please install the following Perl modules before executing ./scripts/mysql_install_db:
yum install autoconf
New default config file was created as /usr/local/mysql56//my.cnf and
will be used by default by the server when you start it.
You may edit this file to change server settings
/etc/my.cnf :skip-grant-tables
update mysql.user set authentication_string=password('新密码') where user='root';
flush privileges;
----------------------------
mysql-ROW_FORMAT
一个表中只能有一个primary key,但是一个primary key可以包含多个column.
在mysql中, 若一张表里面不存在varchar、text以及其变形、blob以及其变形的字段的话,那么张这个表其实也叫静态表,即该表的row_format是fixed,就是说每条记录所占用的字节固定。其优点读取快,缺点浪费额外一部分空间。
单点 复制 集群架构
若一张表里面存在varchar、text以及其变形、blob以及其变形的字段的话,那么张这个表其实也叫动态表,即该表的row_format是dynamic,就是说每条记录所占用的字节是动态的。其优点节省空间,缺点增加读取的时间开销。
所以,做搜索查询量大的表一般都以空间来换取时间,设计成静态表。
explain:
id: SELECT的查询序列号
select_type: SIMPLE / PRIMARY / DEPENDENT SUBQUERY
table: tableName
type: system > const > eq_ref > ref > fulltext > ref_or_null > index_merge > unique_subquery > index_subquery > range > index > ALL
possible_keys: NULL
key: 实际使用的索引
key_len: 使用索引的长度
ref: NULL / const
rows: 执行查询检查的行数
Extra: NULL / Using where / Using filesort /Using index / Using temporary
yum install autoconf;
yum install libaio*