Professional Web Applications Themes

retrieving table data from MySQL - MySQL

Hi I have MySQL Server 5.0 on my machine and I am trying to retrieve data stored in a table. However if I try doing a mysqldump on the database where the table is stored then the MySQL server crashes. The table has around 10 fields in the table. So I am able to execute the following commands successfully: show columns from table x; (assuming table name is x) select field1 from x; select field2 from x; select field3 from x; select field4 from x; select field10 from x; However the following commands cause the server to crash: select * ...

  1. #1

    Default retrieving table data from MySQL

    Hi

    I have MySQL Server 5.0 on my machine and I am trying to retrieve data
    stored in a table. However if I try doing a mysqldump on the database where
    the table is stored then the MySQL server crashes. The table has around 10
    fields in the table. So I am able to execute the following commands
    successfully:

    show columns from table x; (assuming table name is x)
    select field1 from x;
    select field2 from x;
    select field3 from x;
    select field4 from x;
    select field10 from x;

    However the following commands cause the server to crash:

    select * from x;
    select field5 from x;
    select field6 from x;
    select field7 from x;
    select field8 from x;
    select field9 from x;

    So basically I have been able to retrieve the schema for the table and the
    entries for the fields (field1,field2,field3,field4,field10) but I am not
    able to retrieve the data in the other fields. Therefore my question is:

    Is there a way that I can backup/dump data in this table? A look at the logs
    revealed the following error:

    InnoDB: Error in pages 609 and 610 of index PRIMARY of table mt/mt_entry
    InnoDB: records in the wrong order on adjacent pages

    Presumably data has been entered in the wrong format due to poor design of
    the database schema. But is there a workaround to this? Any help/hints would
    be highly appreciated. Thanks


    Navodit Guest

  2. #2

    Default Re: retrieving table data from MySQL

    Navodit wrote: 

    Actually, this looks more like the file itself has been corrupted. Even
    entering data in the wrong format won't give this error.

    I don't know of any way to recover from this type of problem other than
    to restore from backup.

    --
    ==================
    Remove the "x" from my email address
    Jerry Stuckle
    JDS Computer Training Corp.
    net
    ==================
    Jerry Guest

  3. #3

    Default Re: retrieving table data from MySQL


    "Jerry Stuckle" <net> wrote in message
    news:com... 
    >
    > Actually, this looks more like the file itself has been corrupted. Even
    > entering data in the wrong format won't give this error.
    >
    > I don't know of any way to recover from this type of problem other than to
    > restore from backup.
    >
    > --
    > ==================
    > Remove the "x" from my email address
    > Jerry Stuckle
    > JDS Computer Training Corp.
    > net
    > ==================[/ref]

    Can you please elaborate on how to "restore from backup"? I am not sure how
    to go about that since I am not able to take backup via mysqldump. Is there
    another way to take the backup?


    Navodit Guest

  4. #4

    Default Re: retrieving table data from MySQL

    Navodit wrote: 
    >> Actually, this looks more like the file itself has been corrupted. Even
    >> entering data in the wrong format won't give this error.
    >>
    >> I don't know of any way to recover from this type of problem other than to
    >> restore from backup.
    >>
    >> --
    >> ==================
    >> Remove the "x" from my email address
    >> Jerry Stuckle
    >> JDS Computer Training Corp.
    >> net
    >> ==================[/ref]
    >
    > Can you please elaborate on how to "restore from backup"? I am not sure how
    > to go about that since I am not able to take backup via mysqldump. Is there
    > another way to take the backup?
    >
    >[/ref]

    No, you'd have to restore from a *previous backup* - one taken before
    the problem occurred.

    --
    ==================
    Remove the "x" from my email address
    Jerry Stuckle
    JDS Computer Training Corp.
    net
    ==================
    Jerry Guest

  5. #5

    Default Re: retrieving table data from MySQL

    Navodit wrote:
     


    Have you tried REPAIRing the table?


    --
    Brian Wakem
    Email: http://homepage.ntlworld.com/b.wakem/myemail.png
    Brian Guest

  6. #6

    Default Re: retrieving table data from MySQL


    "Brian Wakem" <com> wrote in message
    news:individual.net... 
    >
    >
    > Have you tried REPAIRing the table?
    >
    >
    > --
    > Brian Wakem
    > Email: http://homepage.ntlworld.com/b.wakem/myemail.png[/ref]

    The table is an InnoDB table and not ISAM so I am not sure if this can be
    done. Any ideas how to repair InnoDB tables? Thanks


    Navodit Guest

Similar Threads

  1. Replies: 0
    Last Post: June 1st, 03:15 AM
  2. Replies: 3
    Last Post: August 28th, 12:00 PM
  3. trouble retrieving data from mysql db. Help pls
    By Tw|chie in forum Dreamweaver AppDev
    Replies: 3
    Last Post: May 4th, 10:58 AM
  4. [PHP] Displaying MySQL data inside of a table
    By Jacob Vennervald Madsen in forum PHP Development
    Replies: 3
    Last Post: July 28th, 03:49 PM
  5. Displaying MySQL data inside of a table
    By Sp Computing in forum PHP Development
    Replies: 0
    Last Post: July 28th, 02:08 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139