mysql 空间不足错误
我在第 1 行收到 mysql ERROR 20 (HY000) 的错误
:磁盘已满,正在写入 './homo_sapiens_core_60_37e/dna_align_feature.MYD' (Errcode: 28)。正在等待某人释放空间...(释放磁盘空间后服务器最多会延迟 60 秒才能继续)
我认为这可能是因为我只有 /local 上的空间(df - h 给出)
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/components-root
19G 18G 0 100% /
none 1.4G 240K 1.4G 1% /dev
none 1.4G 100K 1.4G 1% /dev/shm
none 1.4G 80K 1.4G 1% /var/run
none 1.4G 0 1.4G 0% /var/lock
none 1.4G 0 1.4G 0% /lib/init/rw
none 19G 18G 0 100% /var/lib/ureadahead/debugfs
/dev/sdb1 241G 43G 186G 19% /local
/dev/sda1 228M 51M 166M 24% /boot
您如何指定 mysql 的位置将其数据库写入?也许是写数据库的地方没有空间?
如何配置 mysql 写入数据库的位置?也许没有空间试图写入数据?
我是一个unix新手,对mysql也不太了解,所以请温柔地回答!
谢谢
I am getting this error from mysql
ERROR 20 (HY000) at line 1: Disk is full writing './homo_sapiens_core_60_37e/dna_align_feature.MYD' (Errcode: 28). Waiting for someone to free space... (Expect up to 60 secs delay for server to continue after freeing disk space)
I think this could be because i only have space on /local (df - h gives)
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/components-root
19G 18G 0 100% /
none 1.4G 240K 1.4G 1% /dev
none 1.4G 100K 1.4G 1% /dev/shm
none 1.4G 80K 1.4G 1% /var/run
none 1.4G 0 1.4G 0% /var/lock
none 1.4G 0 1.4G 0% /lib/init/rw
none 19G 18G 0 100% /var/lib/ureadahead/debugfs
/dev/sdb1 241G 43G 186G 19% /local
/dev/sda1 228M 51M 166M 24% /boot
How do you specify where mysql writes its databases to? Perhaps there is no space where it is writing the database?
How do you configure where mysql writes its databases? perhaps there is no space where it is trying to write teh data?
I am a unix novice and don't know much mysql either so please be gentle in your answers!
thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在您的
/etc/my.cnf
中,在[mysqld]
标题下,您的 数据目录由datadir
标识。另外,如果它们的默认值被更改,您还应该检查
tmpdir
log-bin
) 和 历史长度 (expire-log-days
) 您的二进制日志保存(如果有)innodb_data_file_path
和innodb_data_home_dir
)slow-query-log-file
(这些日志的大小取决于您的慢速 阈值是)。您可以通过从 MySQL 命令行执行
SHOW VARIABLES
来检查所有这些内容。另请注意,MySQL 仅在启动时读取/etc/my.cnf
中的值,因此在 MySQL 运行时更改该文件不会执行任何操作。最后,您可能会在 serverfault 上获得更多帮助/想法。
In your
/etc/my.cnf
, under the heading[mysqld]
, your the data directory is identified bydatadir
.Also perhaos of interest, in case they were changed from their default, you should also check
tmpdir
log-bin
) and history length (expire-log-days
) of binary logs you're saving (if any)innodb_data_file_path
andinnodb_data_home_dir
)slow-query-log-file
(the size of these logs will depend on how low your slow threshold is).You can check all of these by doing a
SHOW VARIABLES
from the MySQL command line. Also note that MySQL only reads the values in the/etc/my.cnf
upon startup, so changing the file while MySQL is running won't do anything.Lastly, you might get more help/ideas at serverfault.
如果您有
/etc/my.cnf
那么它可能会有所帮助。如果我理解正确的话,数据目录是在启动选项中指定的,或者是从该文件默认的。您需要编辑my.cnf
并在/local
中选择一个目录,然后手动将现有数据从其所在位置传输到/local 中的新位置
。确保传输过程中 MySQL 未运行。If you have
/etc/my.cnf
then it may be helpful. If I understand correctly,, The data directory is specified either in startup options or it is defaulted from that file. You would want to editmy.cnf
and choose a directory in/local
and then manually transfer your existing data from wherever it was to your new place in/local
. Make sure MySQL is not running during the transfer.