Magento数据库传输奇数 [英] Magento Database transfer oddity

查看:63
本文介绍了Magento数据库传输奇数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的情况是我的网站上有一个1.5 GB的sqldump文件.我拿了它,并将其转储到Magento的新副本上的虚拟盒ubuntu环境中,并还原了我的文件系统.相当标准.但是,当我在浏览器中访问本地副本时,它会立即将我重定向到实时站点.另外,我的local.xml也已为我的本地系统正确配置.有谁知道这些值在数据库/phpmyadmin中的什么位置存储?我错过了一些Apache配置吗?

My situation is that I have a 1.5 GB sqldump file from my website. I took this and dumped it into virtual box ubuntu environment on a fresh copy of Magento and restored my file system. Pretty standard. But when I go to access my local copy in the browser it immediately redirects me to the live site. Also my local.xml is correctly configured for my local system. Does anyone know where in the database/phpmyadmin these values are stored? Did I miss some Apache configuration?

推荐答案

运行此查询以获取数据库中的URL:

Run this query to get the URLs in the DB:

SELECT
    *
FROM
    core_config_data
WHERE
    path = "web/unsecure/base_url"
OR path = "web/secure/base_url";

如果在尝试访问网站时启用了缓存,则需要通过删除var/cache&中的文件来清除缓存. var/full_page_cache.

If cache was enabled when you attempted to access the site, you'll need to clear your cache by removing the files in var/cache & var/full_page_cache.

此外,1.5 GB有点大.在传输数据库之前,我总是清除日志.通常将数据库减少到600K以下

Also, 1.5 GB is kind of large. I always clean out logs before I transfer a DB. Usually reduces the DB to less than 600K

SET foreign_key_checks = 0;
TRUNCATE dataflow_batch_export;
TRUNCATE dataflow_batch_import;
TRUNCATE log_customer;
TRUNCATE log_quote;
TRUNCATE log_summary;
TRUNCATE log_summary_type;
TRUNCATE log_url;
TRUNCATE log_url_info;
TRUNCATE log_visitor;
TRUNCATE log_visitor_info;
TRUNCATE log_visitor_online;
TRUNCATE report_viewed_product_index;
TRUNCATE report_compared_product_index;
TRUNCATE report_event;
TRUNCATE index_event;
TRUNCATE catalog_compare_item;
SET foreign_key_checks = 1;

这篇关于Magento数据库传输奇数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆