macos 在 Mac OS X 中创建的 MySQL 数据库文件夹存储在哪里?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/4544894/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-21 07:30:33  来源:igfitidea点击:

Where is the created MySQL database folder stored in Mac OS X?

mysqlmacos

提问by OM The Eternity

Where is the created MySQL database folder stored in Mac OS X?

在 Mac OS X 中创建的 MySQL 数据库文件夹存储在哪里?

回答by álvaro González

Run this query:

运行此查询:

SELECT @@datadir, @@innodb_data_home_dir

The exact files and or subfolders depend on the exact database name and table types.

确切的文件和/或子文件夹取决于确切的数据库名称和表类型。

回答by DevonDahon

For me, it's in /usr/local/var/mysql.

对我来说,它在/usr/local/var/mysql.

回答by DevonDahon

mysql is found in /usr/local/mysql. Databases are stored in the data folder (/usr/local/mysql/data/databasename). This may be different depending on how you installed it.

mysql 位于 /usr/local/mysql 中。数据库存储在数据文件夹(/usr/local/mysql/data/ databasename)中。这可能会有所不同,具体取决于您的安装方式。