Transferring WordPress DB Error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Martin Neumann
    New Member
    • Dec 2007
    • 4

    #1

    Transferring WordPress DB Error

    Hi there - I'm a fairly newbie in regards with MySQL but I have encountered a problem and I'm not sure where to go with it.

    I'm transferring my WP blogs over to a new host and I've so far successfully completed most of them.

    With this DB import I get the following message in phpMyAdmin:

    SQL query:

    -- phpMyAdmin SQL Dump
    -- version 2.11.0
    -- http://www.phpmyadmin. net
    --
    -- Host: test.smalloffic eaustralia
    .com-- Generation Time: Dec 01, 2007 at 07:53 AM
    -- Server version: 5.0.27
    -- PHP Version: 5.2.3
    SET SQL_MODE = "NO_AUTO_VALUE_ ON_ZERO";

    MySQL said: Documentation
    #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 '.com
    SET SQL_MODE="NO_AU TO_VALUE_ON_ZER O"' at line 1
    Any ideas on what's gone wrong?

    Thanks in advance,
    Martin
  • mwasif
    Recognized Expert Contributor
    • Jul 2006
    • 802

    #2
    Hi Martin Neumann,
    Welcome to TSDN!!!

    What are the MySQL versions on new and old host?

    Comment

    • Martin Neumann
      New Member
      • Dec 2007
      • 4

      #3
      old host - MySQL 5.0.27

      new host - MySQL 5.0.24

      Comment

      • mwasif
        Recognized Expert Contributor
        • Jul 2006
        • 802

        #4
        To run this command your MySQL user must have SUPER privilege that you do not have. Remove the following line from your exported sql file and the import the data to new host.
        [CODE=mysql]SET SQL_MODE="NO_AU TO_VALUE_ON_ZER O"[/CODE]

        Comment

        • Martin Neumann
          New Member
          • Dec 2007
          • 4

          #5
          Just deleted that line and tried another import. The following appears...

          [CODE=mysql]-- phpMyAdmin SQL Dump
          -- version 2.11.0
          -- http://www.phpmyadmin. net
          --
          -- Host: test.smalloffic eaustralia
          .com-- Generation Time: Dec 01, 2007 at 07:53 AM
          -- Server version: 5.0.27
          -- PHP Version: 5.2.3--
          -- Database: `epub`
          --
          -- --------------------------------------------------------
          --
          -- Table structure for table `sk2_blacklist`
          --
          CREATE TABLE `sk2_blacklist` (
          `id` int( 11 ) NOT NULL AUTO_INCREMENT ,
          `type` tinytext NOT NULL ,
          `value` text NOT NULL ,
          `score` int( 11 ) NOT NULL default '0',
          `trust` int( 11 ) NOT NULL default '0',
          `comments` text NOT NULL ,
          `added` datetime NOT NULL default '0000-00-00 00:00:00',
          `added_by` tinytext NOT NULL ,
          `last_used` datetime NOT NULL default '0000-00-00 00:00:00',
          `used_count` int( 11 ) NOT NULL default '0',
          `user_reviewed` enum( 'yes', 'no' ) NOT NULL default 'no',
          PRIMARY KEY ( `id` )
          ) ENGINE = MYISAM DEFAULT CHARSET = latin1 AUTO_INCREMENT =621;[/CODE]
          Code:
          MySQL said: Documentation
          #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 '.com
          
          CREATE TABLE `sk2_blacklist` (
            `id` int(11) NOT NULL auto_increment,
            ' at line 1
          Last edited by mwasif; Dec 2 '07, 10:53 AM. Reason: Added [CODE=mysql]/[/CODE] tags

          Comment

          • mwasif
            Recognized Expert Contributor
            • Jul 2006
            • 802

            #6
            Always use proper tags when posting code.

            Look at the line 6 in the above code, you will see .com in the start of the line and it is causing the problem. Either remove .com or the whole line.

            Comment

            • Martin Neumann
              New Member
              • Dec 2007
              • 4

              #7
              It seems to be fixed now.

              I put everything back in and simply played around with spaces in the SQL file and it imported it. Don't ask me how. ;-)

              Thanks for your help anyhow.

              Cheers,
              Martin

              Comment

              Working...