September 21, 2006

How to move mysql Database from ensim to cpanel (manually)

by @ 6:40 pm. Filed under cPanel Hosting, MySQL Hosting Issues., Web Hosting Articles, Linux Hosting, Ensim Hosting

Hello Friends,

Following are the steps to move database from ensim server to cpanel server.

Create a file with all the mysql databases from one domain (type in
each full file name based on the files in the

/var/lib/mysql directory). If there is just one domain then you’ll only
have one domain_com_-_xx entry, if there are several,

then just keep adding the databases.

mysqldump -Q –databases domain_com_-_xx domain_com_-_yy domain_com_-_zz -u root -p –add-drop-table > dump.sql

Step 2: Create the priviliges file

mysqldump mysql > mysql.sql -u root -p

cat mysql.sql | grep domain > mysql2.sql

Step 3: Make the Tar of Files

tar -czvf dump.tar.gz dump.sql mysql2.sql

Step 4: Transfer the files

ftp new.cpanelserver

put dump.tar.gz

At cpanel server you need to do the following steps
Login to cpanel server.

step 1:Start in the directory in /home/admin
cd /home/admin

tar -zvxf dump.tar.gz

Step 2: Run the vi editor to do a search/replace on database name

vi dump.sql

:%s/ecclestoned_com_-/ecclestoned/g

Step 3: Run the vi editor to do a search/replace on the permissions to fix
some version issues.

vi mysql2.sql

:%s/ecclestoned\\\\_com\\\\_-\\\\/ecclestoned/

:%s/);/,’Y',’Y');

Step 4: Run mysql hosting to import the databases

mysql mysql -u root -f

Leave a Reply

You must be logged in to post a comment.

RESELLER HOSTING | DEDICATED SERVER | PREMIUM HOSTING | VPS HOSTING

Micfo Hosting

Micfo International LLC Leading the hosting Industry with Cheap and Affordable Linux Web Hosting Packages.

internal links:

categories:

archives:

Services:

Micfo Hosting

Micfo, delivering the best cpanel web hosting with maximum reliability is our exclusive focus.
Micfo International LLC

search blog:

TOP 10 POSTS:

Pages:

General Links:

Syndicate

other:

35 queries. 0.100 seconds