简体   繁体   English

将 WordPress 网站连接到远程 MySQL 数据库?

[英]Connect WordPress website to remote MySQL database?

I have a WordPress website hosted on GoDaddy and obviously the website content is stored on WordPress's MySQL.我在 GoDaddy 上托管了一个 WordPress 网站,显然该网站内容存储在 WordPress 的 MySQL 上。 Now I want to change this database to my remote MySQL database.现在我想将此数据库更改为我的远程 MySQL 数据库。 Is it possible to get the whole script of WordPress database (all tables with stored content) and run it on my remote database?是否可以获取 WordPress 数据库的整个脚本(所有包含存储内容的表)并在我的远程数据库上运行它? Then I change the connection string from wp-config.php by providing my remote database details.然后我通过提供我的远程数据库详细信息来更改wp-config.php的连接字符串。

Would this procedure work and will my work done remain available?此程序是否有效,我所做的工作是否仍然可用?

It should be no Problem!应该没有问题!

Here are some tips:以下是一些提示:

http://wordpress.org/support/topic/setting-up-wp-with-remote-database http://wordpress.org/support/topic/setting-up-wp-with-remote-database

Yes, this wouldn't be a problem.是的,这不会有问题。 Go into phpMyAdmin in your control panel and export the database.进入控制面板中的 phpMyAdmin 并导出数据库。 Import it into your remote DB.将其导入远程数据库。 Then update wp-config.php with your remote DB details.然后使用您的远程数据库详细信息更新 wp-config.php。

This is built into wordpress.这是内置于 wordpress 中的。
Just login to wordpress, go to tools > export.只需登录wordpress,转到工具>导出。 Select all content, and save the file.选择所有内容,并保存文件。
Then locally, click tools > Import.然后在本地,单击工具 > 导入。

By exporting the database and importing into the other location you cannot possibly ruin anything, so don't be afraid, just export the data, import it where it is needed and change your configuration.通过导出数据库并导入到其他位置,您不可能破坏任何东西,所以不要害怕,只需导出数据,将其导入到需要的地方并更改您的配置。 Do not be afraid to try out things when you cannot ruin anything.当你不能破坏任何东西时,不要害怕尝试。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM