1

Referring to this question:

Restoring MySQL database from physical files

I would:

1) Shut down source server
2) Grab copy of all files in $SourceServer/data/$TheCatalog
3) Create empty "TheCatalog" on target server
4) Stop target server
5) Drop copied files into $TargetServer/data/TheCatalog
6) Start target server
7) ???
8) Profit!

What will the permission state of the new db be? The same as the empty database before dropping the data files in? Do I just need to set permissions and repair tables?

4

1 回答 1

2

当我过去这样做时,除了你所说的之外,我唯一需要做的事情是:

a/ 在第 5 步确保文件都归运行 mysql 的用户所有。

b/ 创建或更改用户以根据需要对目标服务器上的数据库具有权限(用户信息存储在“mysql”数据库中,而不是在被复制的数据库中)。

如果我在数据库运行时复制了文件,我只需要修复表。

于 2009-08-25T23:41:26.427 回答