Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Problem restoring database 'DEFAULT CHARSET=latin1'

Discussion in 'General Discussion' started by BianchiDude, Dec 5, 2005.

  1. BianchiDude

    BianchiDude Well-Known Member
    PartnerNOC

    Joined:
    Jul 2, 2005
    Messages:
    619
    Likes Received:
    0
    Trophy Points:
    166
    Why am I getting this error?

    root@102 [/backup/cpbackup/monthly/kapp/mysql]# mysql kapp_newforum < kapp_newforum.sql
    ERROR 1064 at line 21: 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 'DEFAULT CHARSET=latin1' at line 10
     
  2. darkelder

    darkelder Well-Known Member

    Joined:
    Oct 8, 2004
    Messages:
    74
    Likes Received:
    0
    Trophy Points:
    156
    Which mySQL version do you use? My guess is that you're using mySQL 3 or 4.0 and your sql dump is from 4.1
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. BianchiDude

    BianchiDude Well-Known Member
    PartnerNOC

    Joined:
    Jul 2, 2005
    Messages:
    619
    Likes Received:
    0
    Trophy Points:
    166
    Yes, my dump is from 4.1 and I am restoring to a server that has 4. How can I fix this?
     
  4. darkelder

    darkelder Well-Known Member

    Joined:
    Oct 8, 2004
    Messages:
    74
    Likes Received:
    0
    Trophy Points:
    156
    Edit dump and remove all "DEFAULT CHARSET=latin1" at end of lines that start with CREATE
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    16,309
    Likes Received:
    393
    Trophy Points:
    583
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    I found this via google. Might be worth investigating.

     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. sanjuabrahamk

    sanjuabrahamk Active Member

    Joined:
    Jan 26, 2006
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    156
    Location:
    India
    solution

    Hello,

    Simple solution. No need to edit the dump.

    Please take the dump from the server with mysql version 4.1 with the following command


    shell> mysqldump --create-options --compatible=mysql40 db_name > dump_file

    After that restore the dump to the server with mysql version 4.0

    It will work.

    Thanks
    Sanju Abraham :)

    www.logicsupport.com
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice