Linux机器上存储的mysql数据库中的实际数据在哪里? [英] where is the actual data in a mysql db stored on a linux machine?

查看:286
本文介绍了Linux机器上存储的mysql数据库中的实际数据在哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

哪个文件是在mysql数据库中的表中保存数据的实际文件?

Which files are the actual files holding the data in the tables in a mysql db?

我去了/var/lib/mysql/,我可以看到一堆相对较小的目录,这些目录与我的表相对应,还有很多名为servername-bin.0000001的文件,等等.

I went to /var/lib/mysql/ and I can see there a bunch of relatively small directories corresponding to my tables, and a lot of files named servername-bin.0000001 etc.

数据存储在那些文件中吗?

Is the data stored in those files?

推荐答案

它是特定于安装的,但是如果您使用/var/lib/mysql,则:

It is installation specific, but if you've /var/lib/mysql , then:

  • MyISAM表将存储在/var/lib/mysql/databasename/
  • 中的单个文件中
  • InnoDB驻留在/var/lib/mysql/ibdata中(除非您使用过innodb_per_table设置,在这种情况下,它的存储方式非常类似于MyISAM表)
  • MyISAM tables will be stored in individual files in /var/lib/mysql/databasename/
  • InnoDB resides in /var/lib/mysql/ibdata (unless you've used the innodb_per_table setting, in which case it's stored much like for MyISAM tables)

这篇关于Linux机器上存储的mysql数据库中的实际数据在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆