+ Reply to Thread
Results 1 to 9 of 9

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

  1. #1
    mil1ion is offline x10Hosting Member mil1ion is an unknown quantity at this point
    Join Date
    Dec 2009
    Posts
    14

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

    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.

  2. #2
    Gouri's Avatar
    Gouri is offline Community Paragon Gouri has a brilliant futureGouri has a brilliant futureGouri has a brilliant future
    Join Date
    Oct 2007
    Location
    India
    Posts
    4,502

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

    Can you tell us what is the error. So we can help you.
    If you feel my post is useful then click to give Reputation (bottom left corner of this post)

    X10 Hosting | News and Announcements | Premium Hosting | VPS Hosting | Prime Membership

    Tech Community | Gouri

  3. #3
    mil1ion is offline x10Hosting Member mil1ion is an unknown quantity at this point
    Join Date
    Dec 2009
    Posts
    14

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

    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', 0x613a3136323a7b733a31323a22776562666f726d5f766965 77223b613a363a7b733a393a22617267756d656e7473223b61 3a353a7b733a343a226e6f6465223b4e3b733a363a22746561 736572223b4e3b733a343a2270616765223b4e3b733a343a22 666f726d223b4e3b733a373a22656e61626c6564223b4e3b7d 733a343a2274797065223b733a363a226d6f64756c65223b73 3a31303a227468656d652070617468223b733a32353a227369 7465732f616c6c2f6d6f64756c65732f776562666f726d223b 733a383a2266756e6374696f6e223b733a31383a227468656d 655f776562666f726d5f76696577223b733a31313a22746865 6d65207061746873223b613a313a7b693a303b733a32353a22 73697465732f616c6c2f6d6f64756c65732f776562666f726d 223b7d733a32303a2270726570726f636573732066756e6374 696f6e73223b613a313a7b693a303b733a31393a2274656d70 6c6174655f70726570726f63657373223b7d7d733a32313a22 776562666f726d5f766965775f6d65737361676573223b613a 363a7b733a393a22617267756d656e7473223b613a363a7b73 3a343a226e6f6465223b4e3b733a363a22746561736572223b 4e3b733a343a2270616765223b4e3b733a31363a2[...]
    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

  4. #4
    misson is offline x10 Spammer misson is a jewel in the rough
    Join Date
    Mar 2008
    Location
    Libertatia
    Posts
    2,506

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

    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.
    Be sure to read all pages linked in this post; they have further information that should prove useful. When asking for help, make sure you follow Eric Raymond's and Jon Skeet's guidelines for prompt, accurate responses. Please answer any questions I ask; they're not rhetorical (probably). Any posted code is intended as illustrative example, rather than a solution to your problem to be copied without alteration. Study it to learn how to write your own solution.
    Misson, not Mission.

  5. #5
    mil1ion is offline x10Hosting Member mil1ion is an unknown quantity at this point
    Join Date
    Dec 2009
    Posts
    14

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

    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?

  6. #6
    misson is offline x10 Spammer misson is a jewel in the rough
    Join Date
    Mar 2008
    Location
    Libertatia
    Posts
    2,506

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

    Quote Originally Posted by mil1ion View Post
    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 by misson; 12-13-2009 at 05:46 PM.
    Be sure to read all pages linked in this post; they have further information that should prove useful. When asking for help, make sure you follow Eric Raymond's and Jon Skeet's guidelines for prompt, accurate responses. Please answer any questions I ask; they're not rhetorical (probably). Any posted code is intended as illustrative example, rather than a solution to your problem to be copied without alteration. Study it to learn how to write your own solution.
    Misson, not Mission.

  7. #7
    descalzo's Avatar
    descalzo is offline Grim Squeaker descalzo has a brilliant futuredescalzo has a brilliant futuredescalzo has a brilliant future
    Join Date
    Jul 2009
    Location
    Ankh-Morpork
    Posts
    7,636

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

    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 by descalzo; 12-13-2009 at 06:12 PM.

  8. #8
    mil1ion is offline x10Hosting Member mil1ion is an unknown quantity at this point
    Join Date
    Dec 2009
    Posts
    14

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

    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 by mil1ion; 12-14-2009 at 04:03 PM. Reason: Automerged Doublepost

  9. #9
    oraya68 is offline x10Hosting Member oraya68 is an unknown quantity at this point
    Join Date
    Dec 2009
    Location
    Beautiful Cornwall in England
    Posts
    27

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

    Quote Originally Posted by mil1ion View Post
    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

+ Reply to Thread

Similar Threads

  1. MYSQL Database Setup error?
    By Asphalt in forum Free Hosting
    Replies: 1
    Last Post: 10-25-2008, 07:01 PM
  2. Mysql database...
    By Brash911 in forum Free Hosting
    Replies: 3
    Last Post: 07-31-2008, 01:13 PM
  3. How to import large MySQL database to X10?
    By lachu in forum Free Hosting
    Replies: 12
    Last Post: 03-10-2008, 09:55 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers