Copying a table using phpMyAdmin.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • AshleyB
    New Member
    • Oct 2008
    • 4

    Copying a table using phpMyAdmin.

    2 phpbb boards I run have been hacked. One I've restored but the other one has had some damage to the MySQL db. A table is missing.

    As it's a styles table I thought I could could copy a table, from a test board I set up, to the hacked board.

    I tried this using phpMyAdmin and I get this error:

    Code:
    SQL-query: Edit
    
    CREATE TABLE `Tabcom`.`phpbb_styles_imageset_data` (
    `image_id` smallint( 4 ) unsigned NOT NULL AUTO_INCREMENT ,
    `image_name` varchar( 200 ) COLLATE utf8_bin NOT NULL default '',
    `image_filename` varchar( 200 ) COLLATE utf8_bin NOT NULL default '',
    `image_lang` varchar( 30 ) COLLATE utf8_bin NOT NULL default '',
    `image_height` smallint( 4 ) unsigned NOT NULL default '0',
    `image_width` smallint( 4 ) unsigned NOT NULL default '0',
    `imageset_id` smallint( 4 ) unsigned NOT NULL default '0',
    PRIMARY KEY ( `image_id` ) ,
    KEY `i_d` ( `imageset_id` ) ,
    FULLTEXT KEY `image_name` ( `image_name` ) ,
    FULLTEXT KEY `image_lang` ( `image_lang` ) ,
    FULLTEXT KEY `image_name_2` ( `image_name` )
    ) ENGINE = MYISAM AUTO_INCREMENT = 79DEFAULT CHARSET = utf8 COLLATE = utf8_bin
    
    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 '79DEFAULT CHARSET  = utf8 COLLATE  = utf8_bin' at line 12
    Can you please help?

    Thanks
    Ashley
  • mwasif
    Recognized Expert Contributor
    • Jul 2006
    • 802

    #2
    Make sure you have space between 79 and DEFAULT in the last line of the statement i.e. 79DEFAULT

    Comment

    • AshleyB
      New Member
      • Oct 2008
      • 4

      #3
      Originally posted by mwasif
      Make sure you have space between 79 and DEFAULT in the last line of the statement i.e. 79DEFAULT
      Thanks for your quick reply.

      However the line was generated by phpMyAdmin not by me; so I cannot correct it!

      Comment

      • Atli
        Recognized Expert Expert
        • Nov 2006
        • 5062

        #4
        Can't you simply copy the SQL you posted here, add the space and execute the modified SQL in phpMyAdmin's SQL window?

        Comment

        • AshleyB
          New Member
          • Oct 2008
          • 4

          #5
          Sorry for being so thick!

          Where is the SQL window in phpMyAdmin?

          Ashley

          Comment

          • Atli
            Recognized Expert Expert
            • Nov 2006
            • 5062

            #6
            If you select the database from the drop-down on the left, there should be a SQL tab at the top of the main window.
            That should allow you to run any SQL query you need on the database.

            Comment

            • AshleyB
              New Member
              • Oct 2008
              • 4

              #7
              Yes that worked!

              I no longer get a db error but my board is still hacked.

              Back to the phpbb help forum. :(

              Thanks for being so patient with me.

              Comment

              Working...