database WAMP服务器在哪里存储数据库文件
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5515403/
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
Where does WAMP server store database files
提问by irishbuzz
My hard-drive has encountered some problems and I am unable to boot Windows with it.
我的硬盘遇到了一些问题,我无法用它启动 Windows。
I am able to view the drive's contents by connecting it to another PC as an external drive.
我可以通过将驱动器作为外部驱动器连接到另一台 PC 来查看驱动器的内容。
On the culprit drive I was running a local WAMP server for dev purposes and I'm looking to save the mySQL databases from it.
在罪魁祸首驱动器上,我出于开发目的运行本地 WAMP 服务器,我希望从中保存 mySQL 数据库。
I can see my wamp directory at E:\wamp. Is it possible to start up the server from here so as to use phpmyadmin to perform a mysqldump? If not what are my options to recover the DB-
我可以在E:\wamp. 是否可以从这里启动服务器以便使用 phpmyadmin 执行 mysqldump?如果不是,我有什么选择来恢复 DB-
回答by Jon
On my system, they are in C:\Program Files (x86)\WampServer\bin\mysql\mysql5.1.53\data. So in yours they would be in E:\wamp\bin\mysql\mysql-version\data.
在我的系统上,它们位于C:\Program Files (x86)\WampServer\bin\mysql\mysql5.1.53\data. 所以在你的他们会在E:\wamp\bin\mysql\mysql-version\data.
You can start mysqllocally from E:\wamp\bin\mysql\mysql-version\bin, where all the executables are. Be aware that the configuration file you want to use is E:\wamp\bin\mysql\mysql-version\my.ini.
您可以从mysql本地开始E:\wamp\bin\mysql\mysql-version\bin,所有可执行文件都在那里。请注意,您要使用的配置文件是E:\wamp\bin\mysql\mysql-version\my.ini.
You can also simply copy all the subdirectories to another server. I'm no MySql expert, but that should let the other server use your databases without problem.
您也可以简单地将所有子目录复制到另一台服务器。我不是 MySql 专家,但这应该可以让其他服务器毫无问题地使用您的数据库。
回答by Oscar Njuguna
I needed to re-install Wamp and I recovered my databases by copying the data directory in wamp\bin\mysql\mysql-version\ from a backup, phpMyAdmin picked up the databases and tables.
我需要重新安装 Wamp 并通过从备份中复制 wamp\bin\mysql\mysql-version\ 中的数据目录来恢复我的数据库,phpMyAdmin 选择了数据库和表。

