网络营销电子商务研究中心  
How to buy the best prescription safety glasses in Canada? Let's study!
Go Back   网络营销电子商务研究中心 > 网站建设 > X-Cart
User Name
Password
 
FAQ Members List Calendar Cheap Glasses

Reply
 
Thread Tools Display Modes
  #1   IP: 112.87.93.182
Old 2015-03-31, 12:55 AM
Tenakee Springs Tenakee Springs is offline
初级会员
 
Join Date: 2011-12-15
Posts: 4
Tenakee Springs 现在声名狼藉
Default How To Move X-Cart Database

This tutorial will take you step by step how to transfer your X-Cart database from its current server to a new server.

SERVER1: The server on which your X-Cart currently resides.
SERVER2: The server to which your X-Cart is being moved.

Step 1 - Back Up The Current Database

Telnet/SSH into SERVER1.

Type:
Code:
mysqldump --opt -Q -uUSERNAME -p DATABASENAME > /PATH/TO/DUMP.SQL
In this command, change the following:

USERNAME: The username you use to access MySQL. It is specified in your config.php file.
DATABASENAME: The database which your X-Cart is installed into. It is specified in your config.php file.
/PATH/TO/DUMP.SQL: The server path to the file that will be created.

Once you press enter, you will be prompted for the password you use to access MySQL. This is also specified in your config.php file. Once it has returned to the prompt, verify that DUMP.SQL exists in the directory you specified. If you did not specify a full directory, the file will be in the directory you are currently logged into.

Step 2 - Transfer To The New Server

While logged into SERVER1.

Type:
Code:
ftp SERVER2
In this command, change the following:

SERVER2: the host name (www.example.com) or IP address of the new server.

You should be prompted for a username and password. This is the username and password that you use to login via FTP to your new server.

Type:
Code:
bin
cd /PATH/TO/NEW/DIRECTORY
put /PATH/TO/DUMP.SQL
In this command, change the following:

/PATH/TO/NEW/DIRECTORY: The path to the directory in which you want to place the database backup. If you are unsure what to specify here, you can often omit this command.
/PATH/TO/DUMP.SQL: The same path that you specified in step 1.

Once these commands have finished, type:
Code:
close
quit
Step 3 - Restore On The New Server

If necessary, create the database which your X-Cart will be installed in. Refer to your host for specific information on how this is done. (Can usually be done through a control panel such as Plesk or CPanel). Telnet/SSH into SERVER2.

Type:
Code:
mysql -uUSERNAME -p NEWDBNAME < /PATH/TO/NEW/DUMP.SQL
In this line, you should change the following:

USERNAME: The new username which you will use to access MySQL. If you do not know this value, you should contact your host.
NEWDBNAME: The name of the new database that you created in the first part of this step.
/PATH/TO/NEW/DUMP.SQL: The path to the backup file that you transferred to this server in step 2.


Step 4 - Edit your X-Cart config.php

If your mysql host, username, or password has changed on your new server, will need to open the config.php of SERVER2 and change the values of the database information.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 2 (0 members and 2 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Get Your Monthly Zen Cart Sales With Just One Line of Code Quail Valley ZenCart 0 2014-07-24 09:32 AM
Simple Steps to Change Your Table Prefix in WordPress Abby WordPress 0 2014-04-14 03:40 PM
How to Install an Zen Cart Template topvip ZenCart 0 2009-08-23 05:35 PM
X-Cart Multiple Input Validation Holes Permit SQL Injection and Cross-Site Scripting topvip X-Cart 0 2009-07-21 10:03 AM
x-cart Template Editing Guide for 4.1.x topvip X-Cart 0 2009-04-15 11:42 PM

Prescription-glasses.com offers prescription glasses online at discount prices.
All times are GMT +8. The time now is 10:49 AM.


Powered by vBulletin Version 3.8.7
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.