一.1.1.4数据库安装与调优
#答案
[root@controller~]# openstack-controller-mysql.sh
[root@controller~]# vim /etc/my.cnf
#添加
lower_case_table_names= 1
innodb_buffer_pool_size = 4G
innodb_log_buffer_size=64M
innodb_log_file_size= 256M
innodb_log_files_in_group=2
#重启
[root@controller~]# systemctl restart mariadb
返回
[root@controller ~]# cat /etc/my.cnf | grep -Ev ^'(#|$)' && source /root/variable.sh && mysql -uroot -p$DB_PASS -e "show variables like 'innodb_log%';"
[client-server]
[mysqld]
symbolic-links=0
!includedir /etc/my.cnf.d
default-storage-engine = innodb
innodb_file_per_table
collation-server = utf8_general_ci
init-connect = 'SET NAMES utf8'
character-set-server = utf8
max_connections = 10000
lower_case_table_names= 1
innodb_buffer_pool_size = 4G
innodb_log_buffer_size=64M
innodb_log_file_size= 256M
innodb_log_files_in_group=2
+-----------------------------+-----------+
| Variable_name | Value |
+-----------------------------+-----------+
| innodb_log_buffer_size | 67108864 |
| innodb_log_checksums | ON |
| innodb_log_compressed_pages | ON |
| innodb_log_file_size | 268435456 |
| innodb_log_files_in_group | 2 |
| innodb_log_group_home_dir | ./ |
| innodb_log_optimize_ddl | ON |
| innodb_log_write_ahead_size | 8192 |
+-----------------------------+-----------+
- 点赞
- 收藏
- 关注作者
评论(0)