您的位置:首页 > 数据库 > MySQL

MYSQL-innodb存储引擎配置

2013-12-05 14:15 691 查看
1、查看当前默认的innodb引擎路径:
mysql> show variables like '%innodb_data_file_path%'; +-----------------------+------------------------+ | Variable_name | Value | +-----------------------+------------------------+ | innodb_data_file_path | ibdata1:10M:autoextend | +-----------------------+------------------------+ 1 row in set (0.00 sec)
2、重新配置innodb数据文件路径及其日志路径: innodb_data_home_dir="D:/innodb/" innodb_data_file_path=ibdata1:10M;ibdata2:10M:autoextend innodb_log_group_home_dir="D:/innodb/" --log日志路径
重启服务即可!!!
3、查看日志个数:
mysql> show variables like '%innodb_log_files_in_group%'; +---------------------------+-------+ | Variable_name | Value | +---------------------------+-------+ | innodb_log_files_in_group | 2 | +---------------------------+-------+ 1 row in set (0.00 sec)
配置文件中更改数量:
innodb_log_files_in_group=4 ---ib_logfile日志个数
注意:更改这个数值后要备份一下原来的日志到其他的地方,然后重启并查看:
mysql> show variables like '%innodb_log_files_in_group%'; +---------------------------+-------+ | Variable_name | Value | +---------------------------+-------+ | innodb_log_files_in_group | 4 | +---------------------------+-------+ 1 row in set (0.00 sec)
4、查看支持的引擎:
mysql> show engines ; +--------------------+---------+----------------------------------------------------------------+--------------+------+------------+ | Engine | Support | Comment | Transactions | XA | Savepoints | +--------------------+---------+----------------------------------------------------------------+--------------+------+------------+ | FEDERATED | NO | Federated MySQL storage engine | NULL | NULL | NULL | | MRG_MYISAM | YES | Collection of identical MyISAM tables | NO | NO | NO | | MyISAM | YES | MyISAM storage engine | NO | NO | NO | | BLACKHOLE | YES | /dev/null storage engine (anything you write to it disappears) | NO | NO | NO | | CSV | YES | CSV storage engine | NO | NO | NO | | MEMORY | YES | Hash based, stored in memory, useful for temporary tables | NO | NO | NO | | ARCHIVE | YES | Archive storage engine | NO | NO | NO | | InnoDB | DEFAULT | Supports transactions, row-level locking, and foreign keys | YES | YES | YES | | PERFORMANCE_SCHEMA | YES | Performance Schema | NO | NO | NO | +--------------------+---------+----------------------------------------------------------------+--------------+------+------------+ 9 rows in set (0.00 sec)
mysql> show engine innodb status\G ;
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  it