I am working on a website for a client who has several websites on her web hosting account. I would like to move one of the websites, which is running on WordPress, to my localhost. But am having issues with the MySQL db and can't figure out which database the site is using.
我正在一个网站上为一个在她的网络托管帐户上有几个网站的客户工作。我想将其中一个运行在WordPress上的网站移动到我的localhost。但我遇到了MySQL数据库的问题,无法弄清楚该网站使用的是哪个数据库。
The wp-config.php points to one database, but when I look at that same database in phpMyAdmin there are none of the common WordPress tables in there. Instead of the prefix wp_
there are a bunch of tables with the prefix cp_
. I don't know what that means. There are other databases on the client's hosting account that have WordPress tables, but the wp_options
tables for them all point to other site URLs, not the one I'm trying to work on.
wp-config.php指向一个数据库,但当我在phpMyAdmin中查看同一个数据库时,那里没有常见的WordPress表。而不是前缀wp_,有一堆前缀为cp_的表。我不知道这意味着什么。客户端的托管帐户上有其他数据库有WordPress表,但是它们的wp_options表都指向其他站点URL,而不是我正在尝试处理的那些。
How can I find out which database is being used?
如何找出正在使用的数据库?
1 个解决方案
#1
5
It's possible that the table prefix has been changed to cp_
instead of the standard wp_
. Some installations do that to mitigate some types of SQL injection attacks. wp-config.php
should always point to the real database which, in your case, should have table names like cp_posts
, cp_postmeta
, cp_options
, etc.
表前缀可能已更改为cp_而不是标准wp_。某些安装可以缓解某些类型的SQL注入攻击。 wp-config.php应始终指向真正的数据库,在您的情况下,应该具有表名,如cp_posts,cp_postmeta,cp_options等。
Check for the $table_prefix
variable in the config file, or it may be buried in some cPanel option somewhere.
检查配置文件中的$ table_prefix变量,或者它可能隐藏在某个cPanel选项中。
#1
5
It's possible that the table prefix has been changed to cp_
instead of the standard wp_
. Some installations do that to mitigate some types of SQL injection attacks. wp-config.php
should always point to the real database which, in your case, should have table names like cp_posts
, cp_postmeta
, cp_options
, etc.
表前缀可能已更改为cp_而不是标准wp_。某些安装可以缓解某些类型的SQL注入攻击。 wp-config.php应始终指向真正的数据库,在您的情况下,应该具有表名,如cp_posts,cp_postmeta,cp_options等。
Check for the $table_prefix
variable in the config file, or it may be buried in some cPanel option somewhere.
检查配置文件中的$ table_prefix变量,或者它可能隐藏在某个cPanel选项中。