WordPress: Restoring Your Database From Backup:修订间差异

来自站长百科
跳转至: 导航、​ 搜索
无编辑摘要
无编辑摘要
第1行: 第1行:
== Using phpMyAdmin ==
== 使用 phpMyAdmin ==
== 使用 phpMyAdmin ==
[[WordPress:phpMyAdmin]] is a program used to manipulate databases remotely through a web interface. A good hosting package will have this included. For information on backing up your WordPress database, see [[WordPress:Backing Up Your Database]].


[[WordPress:phpMyAdmin|phpMyAdmin]]是一个程序,用来通过一个网络界面远程地操作数据库。一个好的主机包包含有这个。关于备份你的WordPress数据库的信息,请看看[[WordPress:Backing Up Your Database|备份你的数据库]]。
[[WordPress:phpMyAdmin|phpMyAdmin]]是一个程序,用来通过一个网络界面远程地操作数据库。一个好的主机包包含有这个。关于备份你的WordPress数据库的信息,请看看[[WordPress:Backing Up Your Database|备份你的数据库]]。
Information here has been tested using [[WordPress:phpMyAdmin]] 2.8.0.2 running on Unix.


使用运行在Unix上的[[WordPress:phpMyAdmin|phpMyAdmin]],这里的信息得到了测试。
使用运行在Unix上的[[WordPress:phpMyAdmin|phpMyAdmin]],这里的信息得到了测试。
=== Restore Process ===


=== 重建过程 ===
=== 重建过程 ===
A visual tutorial for phpMyAdmin 2.5.3 can be found at [http://www.tamba2.org.uk/wordpress/restore/ Podz' WordPress Restore guide].


可以在[http://www.tamba2.org.uk/wordpress/restore/ Podz的WordPress 重建指南]找到phpMyAdmin2.5.3的一个视屏指南。
可以在[http://www.tamba2.org.uk/wordpress/restore/ Podz的WordPress 重建指南]找到phpMyAdmin2.5.3的一个视屏指南。
# Login to [[WordPress:phpMyAdmin]].


#登录到[[WordPress:phpMyAdmin|phpMyAdmin]]。
#登录到[[WordPress:phpMyAdmin|phpMyAdmin]]。
# Click databases, and select the database that you will be importing your data into.
#点击数据库,并且选择你将要将你的数据导入的数据库。
#点击数据库,并且选择你将要将你的数据导入的数据库。



2008年6月14日 (六) 14:01的版本

使用 phpMyAdmin

phpMyAdmin是一个程序,用来通过一个网络界面远程地操作数据库。一个好的主机包包含有这个。关于备份你的WordPress数据库的信息,请看看备份你的数据库

使用运行在Unix上的phpMyAdmin,这里的信息得到了测试。

重建过程

可以在Podz的WordPress 重建指南找到phpMyAdmin2.5.3的一个视屏指南。

  1. 登录到phpMyAdmin
  2. 点击数据库,并且选择你将要将你的数据导入的数据库。
  1. You will then see either a list of tables already inside that database or a screen that says no tables exist. This depends on your setup.
  1. 接着你会看到数据库中已经有一列表格或者看到一个界面显示不存在表格。这取决于你的设置。
  1. Across the top of the screen will be a row of tabs. Click the Import tab.
  1. 在界面的顶上方会有一组标签。点击导入标签。
  1. On the next screen will be a Location of Text File box, and next to that a button named Browse.
  1. 在下一个界面中,会是一个文本文件框,旁边有一个按钮,按钮名为浏览
  1. Click Browse. Locate the backup file stored on your computer.
  1. 点击浏览。查找储存在你的电脑上的备份文件。
  1. Make sure the SQL radio button is checked.
  1. 确保选中了SQL单选按钮。
  1. Click the Go button.
  2. 点击Go运行)按钮。

Now grab a coffee. This bit takes a while. Eventually you will see a success screen.

现在来喝一杯咖啡。这个过程花一些时间。最后你会看到一个成功的界面。

If you get an error message, your best bet is to post to the WordPress support forums to get help.

如果你得到了一个错误的信息,你最好的办法就是将错误信息发送到WordPress 支持论坛来寻求帮助。

Using Mysql Commands

使用Mysql 命令行

The restore process consists of unarchiving your archived database dump, and importing it into your Mysql database.

重建过程包括取消你归档的数据库,并且将这个导入到你的Mysql数据库。

Assuming your backup is a .bz2 file, creating using instructions similar to those given for Backing up your database using Mysql commands, the following steps will guide you through restoring your database :

加入你的文件备份是一个.bz2文件,创建这个文件的指示说明与使用 Mysql 命令行来备份你的数据库是相似的,下面的步骤会指导你重建你的数据库:

1. Unzip your .bz2 file:

1.解压你的.bz2文件:

user@linux:~/files/blog> bzip2 -d blog.bak.sql.bz2
user@linux:~/files/blog> bzip2 -d blog.bak.sql.bz2

Note: If your database backup was a .tar.gz called blog.bak.sql.tar.gz file, then, tar -zxvf blog.bak.sql.tar.gz is the command that should be used instead of the above.

注:如果你的数据库备份是一个.tar.gz称作blog.bak.sql.tar.gz文件,那么应该使用tar -zxvf blog.bak.sql.tar.gz命令行,而不是以上的命令行。

2. Put the backed-up SQL back into MySQL:

2.将备份的SQL返回到MySQL:

user@linux:~/files/blog> mysql -h mysqlhostserver -u mysqlusername
 -p databasename < blog.bak.sql


<pre>user@linux:~/files/blog> mysql -h mysqlhostserver -u mysqlusername
 -p databasename < blog.bak.sql


Enter password: (enter your mysql password)
user@linux~/files/blog:> 

输入密码:(输入你的 mysql 密码)

user@linux~/files/blog:>