在Linux系统中,默认会保留5%的空间
[root@db01 log]# tune2fs -m 1 /dev/mapper/VolGroup-lv_root
tune2fs 1.41.12 (17-May-2010)
Setting reserved blocks percentage to 1% (131072 blocks)
查看磁盘空间:
[root@db01 log]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root
50G 48G 783M 99% /
tmpfs 7.7G 0 7.7G 0% /dev/shm
/dev/sda1 485M 32M 429M 7% /boot
空间由原来的100%变成了99%,尝试启动mysql数据库
[root@db01 ~]# service mysqld start
Starting MySQL SUCCESS!
[root@db01 ~]# ps -ef | grep mysql
root 31405 1 3 00:37 pts/2 00:00:00 /bin/sh /export/servers/mysql/bin/mysqld_safe --datadir=/export/servers/mysql/data --pid-file=/export/servers/mysql/tmp/mysql.pid
mysql 32200 31405 63 00:37 pts/2 00:00:01 /export/servers/mysql/bin/mysqld --basedir=/export/servers/mysql --datadir=/export/servers/mysql/data --plugin-dir=/export/servers/mysql/lib/plugin --user=mysql --log-error=/export/servers/mysql/log/error.log --open-files-limit=65535 --pid-file=/export/servers/mysql/tmp/mysql.pid --socket=/export/servers/mysql/tmp/mysql.sock --port=3306
root 32218 27979 0 00:37 pts/2 00:00:00 grep mysql
[root@db01 bin]# /usr/local/mysql/bin/mysql -u root -p
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.5.14-log Source distribution
Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> reset master;
reset master; (清除日志文件)
[root@db01 log]# tune2fs -m 1 /dev/mapper/VolGroup-lv_root
tune2fs 1.41.12 (17-May-2010)
Setting reserved blocks percentage to 1% (131072 blocks)
查看磁盘空间:
[root@db01 log]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root
50G 48G 783M 99% /
tmpfs 7.7G 0 7.7G 0% /dev/shm
/dev/sda1 485M 32M 429M 7% /boot
空间由原来的100%变成了99%,尝试启动mysql数据库
[root@db01 ~]# service mysqld start
Starting MySQL SUCCESS!
[root@db01 ~]# ps -ef | grep mysql
root 31405 1 3 00:37 pts/2 00:00:00 /bin/sh /export/servers/mysql/bin/mysqld_safe --datadir=/export/servers/mysql/data --pid-file=/export/servers/mysql/tmp/mysql.pid
mysql 32200 31405 63 00:37 pts/2 00:00:01 /export/servers/mysql/bin/mysqld --basedir=/export/servers/mysql --datadir=/export/servers/mysql/data --plugin-dir=/export/servers/mysql/lib/plugin --user=mysql --log-error=/export/servers/mysql/log/error.log --open-files-limit=65535 --pid-file=/export/servers/mysql/tmp/mysql.pid --socket=/export/servers/mysql/tmp/mysql.sock --port=3306
root 32218 27979 0 00:37 pts/2 00:00:00 grep mysql
[root@db01 bin]# /usr/local/mysql/bin/mysql -u root -p
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.5.14-log Source distribution
Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> reset master;
reset master; (清除日志文件)
禁止方法: vi /etc/my.cnf把里面的
#log-bin=mysql-bin
#binlog_format=mixed
注释掉,重启mysql服务即可.