导入旧的mysql数据文件夹
重新安装后,所有旧数据仍然显示在 MySQL/data 文件夹中,但实际上并未加载到数据库中。
有没有办法让 MySQL 扫描它的数据文件夹和/或重新导入以前安装的旧文件夹?
[某些数据在上次备份/导出后发生了更改 - 部分是我的错 - 所以我宁愿它识别文件夹而不是重新导入 SQL 文件。]
After a reinstall, all of the old data still shows inside the MySQL/data folder, but is not actually loaded into the database.
Is there any way to have MySQL scan it's data folder and / or reimport the old folders it has from its previous install?
[Some data was changed after the last backup / export - partially my fault - so I would rather it recognize the folders rather than reimporting the SQL files.]
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果数据位于正确的文件夹中,它将在 MySQL 中可见,否则服务器启动时会出现错误。检查
/var/log/messages
和您的 MySQL 错误日志(如您的配置中所定义)。如果您没有收到任何错误并且看不到数据,则
my.cnf
中的数据路径可能指向其他文件夹。If the data is in the correct folder, it will be visible in MySQL, or you will get errors when the server starts. Check
/var/log/messages
and your MySQL error log (as defined in your config).If you don't get any errors and can't see the data, it's likely that the data path in
my.cnf
is pointing to a different folder.以上都是好主意。
要从现有备份目录恢复备份,对任何现有数据库零影响:
服务现在正在从您的备份运行,因此对数据表进行 MySQL 转储您需要
The above are good ideas.
To recover backup from an existing backup directory with zero effect on any existing database:
You are now running from your backup, so do a MySQL dump for data tables you need