如何从WAMP恢复MySQL数据库? [英] How to restore MySQL database from WAMP?

查看:210
本文介绍了如何从WAMP恢复MySQL数据库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

上个月,我不得不重新安装Windows,我已将 WAMP 文件夹移到另一个分区。现在我已经安装了WAMP,但我需要旧的数据库。如何从保存的WAMP文件夹中保存旧的MySQL数据库?

Last month I had to reinstall Windows and I've moved the WAMP folder to another partition. Now I've installed WAMP again but I need the old database. How can I take the old MySQL database from the saved WAMP folder on the safe partion?

在wamp / bin / mysql /../ data /我有我的旧数据库。如果我仅复制数据库文件夹,在 phpMyAdmin 中,我看不到所有的表/视图

In the wamp/bin/mysql/../data/ I have my old databases. If I copy the database folder only, in phpMyAdmin I can't see all the tables/views from the old database.

推荐答案

看起来您使用 InnoDB 表,因此您还应该在数据文件夹中复制ib *文件(但这将覆盖在新安装中创建的任何InnoDB表。)

Looks like you use InnoDB tables, so you should also copy ib* files in data folder (but this will overwrite any InnoDB table created in new installation.)

或者(甚至更好),您可以在配置文件中设置'datadir'参数,并在旧安装中指定数据文件夹的路径。

Alternatively (even better) you may set 'datadir' parameter in configuration file and specify path to data folder in old installation.

这篇关于如何从WAMP恢复MySQL数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆