Leopard Server的MySQL在哪里存储数据?

时间:2022-08-04 00:01:05

I'm trying to recover a table in a MySQL database from Time Machine, however I don't know and can't find where Leopard Server's MySQL stores its data files.

我正在尝试从Time Machine恢复MySQL数据库中的表,但是我不知道并且找不到Leopard Server的MySQL存储其数据文件的位置。

  1. Does anyone know where they are stored?
  2. 有谁知道它们存放在哪里?
  3. Is there an easy way to run mysqldump on them without restoring them?
  4. 是否有一种简单的方法可以在不恢复它们的情况下对它们运行mysqldump?
  5. Is there anything else I should know about Time Machine and MySQL data file(s)?
  6. 关于Time Machine和MySQL数据文件还有什么我应该知道的吗?

3 个解决方案

#1


28  

Connect to the database and issue

连接到数据库并发布

SHOW VARIABLES LIKE 'datadir';

Which will tell you the right answer even if it's been changed from the default.

即使它已从默认值更改,这将告诉您正确的答案。

#2


12  

For my standard install (from a package) it was located in

对于我的标准安装(从包中),它位于

/usr/local/mysql/data

#3


0  

It's in /var/mysql/dbname , where dbname is the name of the database.

它位于/ var / mysql / dbname中,其中dbname是数据库的名称。

#1


28  

Connect to the database and issue

连接到数据库并发布

SHOW VARIABLES LIKE 'datadir';

Which will tell you the right answer even if it's been changed from the default.

即使它已从默认值更改,这将告诉您正确的答案。

#2


12  

For my standard install (from a package) it was located in

对于我的标准安装(从包中),它位于

/usr/local/mysql/data

#3


0  

It's in /var/mysql/dbname , where dbname is the name of the database.

它位于/ var / mysql / dbname中,其中dbname是数据库的名称。