The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Problems with restoring mysql dbs

Discussion in 'General Discussion' started by aykfounder, Oct 26, 2005.

  1. aykfounder

    aykfounder Well-Known Member

    Joined:
    Feb 22, 2004
    Messages:
    102
    Likes Received:
    0
    Trophy Points:
    16
    Here's what I did:

    On the old cpanel machine, logged into phpmyadmin, did a backup of the database, saved it to my computer, uploaded it to my new server, ran:

    mysql -u username -p dbname < db.sql

    and got this error:


    ERROR 1064 at line 19: 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 AUTO_INCREMENT=110' at line 10


    Any ideas on how to fix this?

    Thanks
     
  2. AndyReed

    AndyReed Well-Known Member
    PartnerNOC

    Joined:
    May 29, 2004
    Messages:
    2,222
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Minneapolis, MN
    Is the version of MySQL the same on both servers? If not, then you have to check MySQL web site for more information on how to import your DB.

    If they are the same, you might want to create the table on the new server and then export
    the table structure.
     
  3. aykfounder

    aykfounder Well-Known Member

    Joined:
    Feb 22, 2004
    Messages:
    102
    Likes Received:
    0
    Trophy Points:
    16
    Yep, it was different. Upgraded to 4.1.X. Wonder if this will mess up any of our passwords.
     
  4. aykfounder

    aykfounder Well-Known Member

    Joined:
    Feb 22, 2004
    Messages:
    102
    Likes Received:
    0
    Trophy Points:
    16
    Yep, it works now.

    So, after upgrading to 4.1.13, should I run apache/easyapache or that's not necessary?

    Thanks
     
  5. Website Rob

    Website Rob Well-Known Member

    Joined:
    Mar 23, 2002
    Messages:
    1,506
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    Alberta, Canada
    cPanel Access Level:
    Root Administrator
    Here's my story. :(

    I tested with one of our Servers in upgrading mySQL, from 4.0x to 4.1x, and everything went smooth. Although WHM mentions about having run certain scripts afterwards, I never did. I waited the 30 seconds then clicked the link mentioned:

    If you made changes to the mysql version, please Click Here after waiting 30 seconds to have them take effect.

    All was well till later that day when I changed a Username for an account. KA-BLUEEEEE !!!!

    First error msg. was not being able to find lib_php4.so or something, so I immediately ran Easyapache, hoping it would fix the situation --- NOT.

    Apache did restart but with constant errors and not serving any web pages or mysql. I lost a lot of time submitting a Ticket and contacting Tech Support who didn't know how to fix it either, until I contacted them later and pointed something out to them. Many of the errors, if not all, seemed to be related to mod_security. Even though I removed all Rules, the errors continued. Had to uninstall mod_security and restart Apache to finally solve the problem.

    Turns out mod_security (1.8.7 as provided through DarkOrb) does not like mySQL 4.1x at all! A reinstall of mod_security went OK, but now WHM shows a blank page and it does appear that until a new mod_security release comes out, with support for mySQL 4.1, it will stay forever blank. Also, you'll have to manually enter your Rules:

    /usr/local/apache/conf/modsec.user.conf

    Could be that I created the problem myself, from not running the processes mentioned in WHM, but as we know, best not tinker much with WHM, when things appear to be running smoothly. There is a new version of mod_security available, but apparently not yet ready for production Servers and no mention of whether it works with mySQL 4.1x.

    Gotta love this Web stuff! :D
     
Loading...

Share This Page