如何将MySQL数据库移动到外部硬盘?

时间:2021-08-27 07:14:17

I am running OS X 10.5 and I do not know much about MySQL configuration. I am using a local MySQL database to deposit data from an application but it is getting close to my hard disk's capacity. What do I need to do to get the database stored on my external hard disk? Where can I get documentation to learn how to do this?

我正在运行OS X 10.5,我对MySQL配置知之甚少。我使用本地MySQL数据库来存储来自应用程序的数据,但它接近我的硬盘容量。如何将数据库存储在外部硬盘上需要做什么?我在哪里可以获得文档来学习如何做到这一点?

2 个解决方案

#1


One way would be to use mysqldump to create a new database on your external disk.

一种方法是使用mysqldump在外部磁盘上创建一个新数据库。

The point your application at that instance of the database.

您的应用程序指向该数据库实例。

#2


You can use an app like Sequel Pro if you want something a bit more graphical, connect to your local databases then hit export. Then you'll have a .sql backup of them, you can use this to restore it later on.

您可以使用像Sequel Pro这样的应用程序,如果您想要更多图形化的东西,连接到本地数据库然后点击导出。然后你将拥有它们的.sql备份,你可以使用它来稍后恢复它。

#1


One way would be to use mysqldump to create a new database on your external disk.

一种方法是使用mysqldump在外部磁盘上创建一个新数据库。

The point your application at that instance of the database.

您的应用程序指向该数据库实例。

#2


You can use an app like Sequel Pro if you want something a bit more graphical, connect to your local databases then hit export. Then you'll have a .sql backup of them, you can use this to restore it later on.

您可以使用像Sequel Pro这样的应用程序,如果您想要更多图形化的东西,连接到本地数据库然后点击导出。然后你将拥有它们的.sql备份,你可以使用它来稍后恢复它。