[root@zabbix2 ~]# find / -name my.cnf
/etc/my.cnf
[root@zabbix2 ~]# mysql zabbix
mysql> show variables like "innodb_%_size"
-> ;
+---------------------------------+---------+
| Variable_name | Value |
+---------------------------------+---------+
| innodb_additional_mem_pool_size | 1048576 |
| innodb_buffer_pool_size | 8388608 |
| innodb_log_buffer_size | 1048576 |
| innodb_log_file_size | 5242880 |
+---------------------------------+---------+
4 rows in set (0.00 sec)
[root@zabbix2 ~]# service mysqld restart
mysqld を停止中: [ OK ]
mysqld を起動中: [ OK ]
[root@zabbix2 ~]# service mysqld stop
mysqld を停止中: [ OK ]
[root@zabbix2 ~]# vi /etc/my.cnf
[root@zabbix2 ~]#
[root@zabbix2 ~]#
[root@zabbix2 ~]# service mysqld start
mysqld を起動中: [ OK ]
[root@zabbix2 ~]# mysql
mysql> set global innodb_fast_shutdown=0;
Query OK, 0 rows affected (0.00 sec)
mysql> Ctrl-C -- exit!
Aborted
[root@zabbix2 ~]# service mysqld stop
mysqld を停止中: [ OK ]
[root@zabbix2 ~]# df
Filesystem 1K-ブロック 使用 使用可 使用% マウント位置
/dev/xvda1 18864128 13283108 5581020 71% /
tmpfs 250736 176 250560 1% /dev/shm
[root@zabbix2 ~]# vi /etc/my.cnf
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
character-set-server=utf8
innodb_buffer_pool_size=64M
innodb_log_file_size=32M
innodb_log_files_in_group=2
innodb_flush_method=O_DIRECT
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
[mysqldump]
default-character-set=utf8
[mysql]
default-character-set=utf8
[root@zabbix2 ~]# cd /var/lib/mysql/
[root@zabbix2 mysql]# ls -al
合計 10235928
drwxr-xr-x 5 mysql mysql 92 2月 4 15:20 2014 .
drwxr-xr-x 22 root root 4096 11月 14 23:16 2013 ..
-rw-rw---- 1 mysql mysql 5242880 2月 4 15:20 2014 ib_logfile0
-rw-rw---- 1 mysql mysql 5242880 2月 4 15:20 2014 ib_logfile1
-rw-rw---- 1 mysql mysql 10471079936 2月 4 15:20 2014 ibdata1
drwx------ 2 mysql mysql 4096 11月 14 22:43 2013 mysql
drwx------ 2 mysql mysql 6 11月 14 22:43 2013 test
drwx------ 2 mysql mysql 4096 11月 14 23:39 2013 zabbix
[root@zabbix2 mysql]# rm -f ib_logfile0
[root@zabbix2 mysql]# rm -f ib_logfile1
[root@zabbix2 mysql]#
[root@zabbix2 mysql]# service mysqld start
mysqld を起動中: [ OK ]
[root@zabbix2 mysql]# ls -al
合計 10291224
drwxr-xr-x 5 mysql mysql 109 2月 4 15:56 2014 .
drwxr-xr-x 22 root root 4096 11月 14 23:16 2013 ..
-rw-rw---- 1 mysql mysql 33554432 2月 4 15:56 2014 ib_logfile0
-rw-rw---- 1 mysql mysql 33554432 2月 4 15:56 2014 ib_logfile1
-rw-rw---- 1 mysql mysql 10471079936 2月 4 15:20 2014 ibdata1
drwx------ 2 mysql mysql 4096 11月 14 22:43 2013 mysql
srwxrwxrwx 1 mysql mysql 0 2月 4 15:56 2014 mysql.sock
drwx------ 2 mysql mysql 6 11月 14 22:43 2013 test
drwx------ 2 mysql mysql 4096 11月 14 23:39 2013 zabbix
[root@zabbix2 mysql]# service zabbix-server start
Starting Zabbix server: [ OK ]
[root@zabbix2 mysql]#
[root@zabbix2 mysql]# mysql zabbix
mysql> show variables like "innodb_%_size";
+---------------------------------+----------+
| Variable_name | Value |
+---------------------------------+----------+
| innodb_additional_mem_pool_size | 1048576 |
| innodb_buffer_pool_size | 67108864 |
| innodb_log_buffer_size | 1048576 |
| innodb_log_file_size | 33554432 |
+---------------------------------+----------+
4 rows in set (0.00 sec)