需要帮助来备份 phpMyAdmin 数据库
我想从 php 文件备份我的数据库...
我使用 phpMyAdmin 作为后端。我想从该数据库创建 Excel 文件,可以吗?是的那怎么办?给我一些建议,提前谢谢...
我的另一个问题是:
如果我正在运行这个 php 代码,那么当它存储该文件时..?我已经检查了不在里面的 phpMyAdmin bt,代码如下
<?php
include 'config.php';
include 'opendb.php';
$tableName = 'mypet';
$backupFile = 'backup/mypet.sql';
$query = "SELECT * INTO OUTFILE '$backupFile' FROM $login_master";
$result = mysql_query($query);
include 'closedb.php';
?>
i want to backup my database from php file...
i am using phpMyAdmin as back end. i want to create excel file from that data base is it possible? yes then how? give me some suggestion on it thanks in advance...
my one more querty is:
if i am running this php code then when it store that file..? i've checked into the phpMyAdmin bt that was not inside that the code is as below
<?php
include 'config.php';
include 'opendb.php';
$tableName = 'mypet';
$backupFile = 'backup/mypet.sql';
$query = "SELECT * INTO OUTFILE '$backupFile' FROM $login_master";
$result = mysql_query($query);
include 'closedb.php';
?>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
新的备份链接:
Mysqli: https://www.dropbox.com/s/s9qmvj7um4h5tdx/ backup.php?dl=0
Mysql:https://www.dropbox.com/s/n14p9uf9wc09ow0/ index.php?dl=0
将此文件放在您的 WWW 文件夹中,然后运行它,如果发生错误,请不要惊慌,但您的数据库已备份在 www 文件夹中
New backup link :
Mysqli : https://www.dropbox.com/s/s9qmvj7um4h5tdx/backup.php?dl=0
Mysql :https://www.dropbox.com/s/n14p9uf9wc09ow0/index.php?dl=0
Put this file in your WWW folder and just run it dont panic if error occured but you database is backuped in www folder
这很容易。
导出
选项卡。go
。完毕。
It's pretty easy.
export
tab at the top.go
at the bottom.Done.
选择数据库后,您应该单击“导出”选项卡。您将看到一个包含许多选项的页面(要导出哪些表、导出文件的名称、文件类型、是 excel 还是 sql 还是其他...)。
无论如何,如果可能的话,我建议使用命令行。
Once you have selected your database, you should click on "Export" tab. You will be shown a page with a number of options (which tables to export, the name of the export file, the type of file, whether excel or sql or whatever...).
Anyway, I suggest to use the command line if possible.