SQL Query error when moving DB to new server?

Im moving host and I had to split up the DB from the old host into 4 different segments due to size.



I create the new DB in the new host and started the import process of the DB from the old host.

The first 2 segments imported just fine. But the 2nd 2 segments of the DB keep getting this error:

(what does this error mean)

****************************************************************************************************************************



SQL query:

phpMyAdmin MySQL said:

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

"http://www.w’ at line 1

Or maybe someone can help me upload it. Be willing to pay a little if needed.

The SQL query isn't related to CS-Cart as far as I can see. Perhaps that's the 'information_schema' database from phpMyAdmin.



What size is your database? Might just be easier to gzip it on the server and migrate and deploy the database on the new server via SSH.

The total Db size is 142Mb



Why would it even be giving me this error?

I just need to get this DB uploaded but just isnt working,

Do you have shell access to both of your hosts? It would be very easy if you did. Otherwise, you can manually download the database backup file from your existing host to your desktop then upload via FTP to your new host. Then you can restore the database via SSH on your new host, or upload the file to your /var/database/backup/ folder and restore it through CS-Cart.

[quote name='StellarBytes' timestamp='1360160340' post='154573']

Do you have shell access to both of your hosts? It would be very easy if you did. Otherwise, you can manually download the database backup file from your existing host to your desktop then upload via FTP to your new host. Then you can restore the database via SSH on your new host, or upload the file to your /var/database/backup/ folder and restore it through CS-Cart.

[/quote]



I know I dont on the old host, not sure about the new host.



I do have a FTP client. I use filezilla. Im uploading all the Filemanager files now from the old filemanager to the new filemanger. (All the installtion files and images, ect)



Sorry if Im asking alot of questions but how would I restore it through CS-cart?



Im assuming I would install a fresh install on the cPanel. Go into the admin panel and then go to admin/ then databse and click restore DB.



But If I do that, I would lose all my pages, block settings, and my layout ive changed wouldn't I?

[quote name='harpersmoto' timestamp='1360163994' post='154579']

I know I dont on the old host, not sure about the new host.



I do have a FTP client. I use filezilla. Im uploading all the Filemanager files now from the old filemanager to the new filemanger. (All the installtion files and images, ect)



Sorry if Im asking alot of questions but how would I restore it through CS-cart?



Im assuming I would install a fresh install on the cPanel. Go into the admin panel and then go to admin/ then databse and click restore DB.



But If I do that, I would lose all my pages, block settings, and my layout ive changed wouldn't I?

[/quote]

I would install a fresh copy of the same version on the new server.



Download a full backup of all files from your existing server.



Upload your skin (and any custom addons if you have any) folder to the new installation



Complete the new install, and select your skin on the new install. Now all you should be missing, is your blocks layouts, products, customers, orders, settings, etc.



Now go to your existing live site, complete a full database backup and download that file.



Restore that database file to your new server, ensuring the database name and access details are set in config.local.php



The database stores the infomation for your pages, block settings, layout, etc, so you will be restoring them when you restore your database backup.



Close the existing storefront, ensure you have all the customers/orders migrated, update the domain DNS records, wait for your site to go live on the new site once DNS has resolved.

Do you think it would be a problem since I have 3.0.3 pro to download the 3.0.5 pro?



I dont have the 3.0.3 version and dont have it in my file area either

The database won't, as far as I understand, upgrade from 3.0.3 to 3.0.5 if you restore a database from a previous version (ie. restore 3.0.3 database using 3.0.5). I haven't compared the database structures between 3.0.3, 3.0.4 or 3.0.5 to see if there are any differences in table names or field names. You will need to install 3.0.3 and then upgrade to 3.0.5.



In this case, it would be a safer option to upgrade your current site to 3.0.5 and then transfer it to the new server.

okay. I found a 3.0.3 pro .tar file.

SO im getting that installed now.



EDIT:

Just got the install finished and now am copying over the “skin” folder from the old host to the new host



So now im still uploading the full cPanel backup from the old host to the new host as we speak. Will still take about another 4-5 hours.

Well mostly everything seems to have worked except a few issues.



I did what you said by putting the DB backup in the var folder and restoring it through CS-Cart.

For some reason though it didn't copy all my products over. Shows only about 18,000 vs my 32,000 I have.



I even tried to export the_products table out by itself and import it in and wont accept anymore of it.

Not sure why it wont take the full DB.



And when I try to do anything on the home page, I get this error:





Fatal error: Call to undefined function smarty_modifier_fn_seo_is_indexed_page() in /home/harpermo/public_html/var/cache/templates/customer/%%45^45E^45E480CD%%index.tpl.php on line 59

You need to make sure all your skins folder is intact and has the correct permissions, same goes for the /var/ directory and subfolders. Clearing the cache normally resolves that error.



As for the database…I'm at a loss with that one. Does phpMyAdmin report any errors? How many rows are in your existing products table in comparison to the new products table?

[quote name='StellarBytes' timestamp='1360193798' post='154635']

You need to make sure all your skins folder is intact and has the correct permissions, same goes for the /var/ directory and subfolders. Clearing the cache normally resolves that error.



As for the database…I'm at a loss with that one. Does phpMyAdmin report any errors? How many rows are in your existing products table in comparison to the new products table?

[/quote]



The phpMyAdmin didn't report an error.



When I restored the DB through the admin panel of the website, it said it had finish successfully. No error.

The DB didnt report an error either when I tried to upload the harpermo_products table in by itsself either.



The error that is displayed above only displayed when I tried to refresh the customer home page.



The current DB on the live site has 693,518 rows/ 144.3 Mb



The new host DB has 36,651 rows/ 11.7 Mb

If this helps, this was the peice of code on line 51 of that error message.


_tpl_vars['addons']['seo']['status'] == 'A'): ?>_tpl_vars; ?>_tpl_vars['_REQUEST'])): ?>


Now Im also getting an error on line 51:

Unless you're using the files from your existing server, it might be easier to use the files from your existing site. When certain addons are installed, their files are copied into your skin folder, so using a clean install of 3.0.3 to import a 3.0.3 database which thinks the addons are already installed may cause you problems.



Follow the guide for moving to a new host - although you might have a little more fun with that database. In the existing store, in Administration>Database, run the Maintenance task which might repair any wrongdoings in the database.

W0uld this error mean that my SSL Certificaite didnt install correctly?

*******************************************************************************************

Secure connection failed



An error occurred during a connection to www.harpermoto.com.



SSL recieved a record that exceeded the maximum permissible length.



(Error code: ssl_error_rx_record_too_long)

[quote name='harpersmoto' timestamp='1360252850' post='154678']

W0uld this error mean that my SSL Certificaite didnt install correctly?

*******************************************************************************************

Secure connection failed



An error occurred during a connection to www.harpermoto.com.



SSL recieved a record that exceeded the maximum permissible length.



(Error code: ssl_error_rx_record_too_long)

[/quote]

Yes. Unless you've got an unmanaged hosting plan, I would suggest asking your host to install the SSL certificate for you.

I just talked to them and they said that its best to do that after the domain has finished registering with them.



I already have SSL with the old host, they said that can be swapped over.

Said all I would need is the private key and certificate.



ALso looks like the DB finally transfered over. I atleast have my 30,000 products. Some of my blocks and pages didnt copy over though

Blocks and pages are stored in the database.



You will only be able to install the certificate once your domains DNS points to the new host. You will need to generate a new certificate signing request (CSR) on the new host to supply to your SSL certificate providers to re-issue a new SSL certificate for that server.

Well maybe ill try to reimport the pages and blocks tables cause only a small amount of them moved over.



All my products and categories moved over though.



UPDATE:



Maybe they just arent active and I have to recreate them in the admin panel.

Also Im going to have to retry the User tables.



THey didnt copy over for somereason.