Help moving MySQL database from old webhost to here. Gives error.

mil1ion

New Member
Messages
14
Reaction score
0
Points
0
So I am trying to move a MySQL database from my old webhost on to X10. First what I do is export the old one in PHPMyadmin. I only have the options of zip, gzip, or bzip. It doesn't matter which one I do because when I go to PHPMyadmin on X10 and try to import it, it gives me a mile long error. I wouldn't say I'm that much of a noob, but help would be appriciated. :)
 

Gouri

Community Paragon
Community Support
Messages
4,565
Reaction score
245
Points
63
Can you tell us what is the error. So we can help you.
 

mil1ion

New Member
Messages
14
Reaction score
0
Points
0
OK so I googled and tried something different, but I think I got a much more hopful error. I just plain exported my old db on my old webhost and copied everything inot a text file and saved it to my computer. Then I tried uploading that onto X10 and this is the error I got.

Error

SQL query:
INSERT INTO `cache` VALUES('theme_registry:greenNblack', 0x613a3136323a7b733a31323a22776562666f726d5f76696577223b613a363a7b733a393a22617267756d656e7473223b613a353a7b733a343a226e6f6465223b4e3b733a363a22746561736572223b4e3b733a343a2270616765223b4e3b733a343a22666f726d223b4e3b733a373a22656e61626c6564223b4e3b7d733a343a2274797065223b733a363a226d6f64756c65223b733a31303a227468656d652070617468223b733a32353a2273697465732f616c6c2f6d6f64756c65732f776562666f726d223b733a383a2266756e6374696f6e223b733a31383a227468656d655f776562666f726d5f76696577223b733a31313a227468656d65207061746873223b613a313a7b693a303b733a32353a2273697465732f616c6c2f6d6f64756c65732f776562666f726d223b7d733a32303a2270726570726f636573732066756e6374696f6e73223b613a313a7b693a303b733a31393a2274656d706c6174655f70726570726f63657373223b7d7d733a32313a22776562666f726d5f766965775f6d65737361676573223b613a363a7b733a393a22617267756d656e7473223b613a363a7b733a343a226e6f6465223b4e3b733a363a22746561736572223b4e3b733a343a2270616765223b4e3b733a31363a2[...]
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 '' at line 1
 

misson

Community Paragon
Community Support
Messages
2,572
Reaction score
72
Points
48
Take a closer look at the rest of the error, where it identifies exactly where the query is syntactically incorrect. You should see (assuming what you pasted is exactly the same as what's in the query) that it's somewhere in the hex number, right after a space. Hex numbers can't have spaces.
 

mil1ion

New Member
Messages
14
Reaction score
0
Points
0
So pretty much are you telling me that in all the jumble of stuff after greennblack there is a space in there that I have to remove?
 

misson

Community Paragon
Community Support
Messages
2,572
Reaction score
72
Points
48
So pretty much are you telling me that in all the jumble of stuff after greennblack there is a space in there that I have to remove?
No, there are many spaces that you need to remove. In the sample you posted, there are 19, and presumably much more in the full query. Use a scripting language (e.g. PHP, Python) or a powerful editor (e.g. emacs) to remove the spaces.

Note the parenthetical comment in my previous post: this is assuming the posted fragment is an accurate copy of what's in the original query. If the act of copying introduced the spaces, the problem will lie elsewhere. That is why I said to read the rest of the error message. In fact, better post a little of it; you should be able to edit the post with the error message and add it there.
 
Last edited:

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
Note the parenthetical comment in my previous post: this is assuming the posted fragment is an accurate copy of what's in the original query. If the act of copying introduced the spaces, the problem will lie elsewhere

I think the spaces are due to the forum display. If you 'quote' his post, there are no spaces that I can see.

SQL query:
INSERT INTO `cache` VALUES('theme_registry:greenNblack',

Just wondering if you need to copy over the cache.
 
Last edited:

mil1ion

New Member
Messages
14
Reaction score
0
Points
0
Ya I looked at the actually text that I copied and there were no spaces in the whole thing whatsoever. Should I upload the text file so you can see it cus I don't really know anything about this...
Edit:
I know that greennblack is a drupal theme I have installed. If all else fails do you think I should try uninstalling that theme and then try it?
 
Last edited:

oraya68

New Member
Messages
27
Reaction score
0
Points
0
So I am trying to move a MySQL database from my old webhost on to X10. First what I do is export the old one in PHPMyadmin. I only have the options of zip, gzip, or bzip. It doesn't matter which one I do because when I go to PHPMyadmin on X10 and try to import it, it gives me a mile long error. I wouldn't say I'm that much of a noob, but help would be appriciated. :)

You need to check your versions! I suspect you are getting this due to two different versions. Are you able to back up the database from the command line, with the --compatible=mysql50 flag?

Kind regards,
Oraya
 
Top