SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    Employed Again Viflux's Avatar
    Join Date
    May 2003
    Location
    London, On.
    Posts
    1,127
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Table exists, but doesn't, but does...

    Got a weird error here, not sure how to explain it.

    I started getting errors in my gallery software.

    Upon investigation, it's a MySQL error. It tells me that one of the necessary tables doesn't exist.

    If I do a 'show tables;', it lists the table in question. If I do a 'describe table_name;' it tells me it doesn't exist. If I try to recreate it, it tells me it already exists.

    Thoughts?

  2. #2
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,350
    Mentioned
    63 Post(s)
    Tagged
    3 Thread(s)
    CHECK TABLE tbl_name
    REPAIR TABLE tbl_name
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  3. #3
    Employed Again Viflux's Avatar
    Join Date
    May 2003
    Location
    London, On.
    Posts
    1,127
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Table 'tbl_name' doesn't exist.
    Table 'tbl_name' doesn't exist.


    I've decided to abandon this hassleware and write my own quick gallery thing.

    Off Topic:


    Never volunteer to maintain a website for your friends wedding pictures.

  4. #4
    reads the ********* Crier silver trophybronze trophy longneck's Avatar
    Join Date
    Feb 2004
    Location
    Tampa, FL (US)
    Posts
    9,854
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    this behavior means one of two things:
    1) if myisam tables, then the .frm file exists, but none of the other files do. the .frm file describes the table, the .myd file is the actual data and the .myi file is the index.
    2) if innodb tables, then the server was either started or reconfigured without innodb, or the inno files have been moved or deleted. inno tables still have .frm files (and .myd or .myi depending on the mysql version) but the data is actually stored in the root of the data directory (ib*.* and innodb*.*).

  5. #5
    SitePoint Zealot Thermit's Avatar
    Join Date
    Mar 2005
    Posts
    157
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    My problem is different, but the title of thread is perfect to describe my problem as well.

    I've got some php code which is supposed to create a mySQL table if a "SELECT * FROM table" fails. When executed the first time, the code attempts to create the table and insert some data. On subsequent runs, it no longer attempts to create the table, implying it exists now (although it appears the data was not inserted). The strange part is that I can't actually see these CREATE'd tables when I use phpMyAdmin or mysqldump. If I force the code thru the CREATE section now, I get a duplicate table error, which confirms that the php is seeing something that I can't. The some DB interface is used for all operations.

    Where are these ghost tables?

  6. #6
    reads the ********* Crier silver trophybronze trophy longneck's Avatar
    Join Date
    Feb 2004
    Location
    Tampa, FL (US)
    Posts
    9,854
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    your problem is different. the user that your application uses created the table but did not give other users rights to that table. please don't hijack threads.

  7. #7
    SitePoint Zealot Thermit's Avatar
    Join Date
    Mar 2005
    Posts
    157
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Made a judgement call to recycle thread in this case.

    Thanks for reply.
    Last edited by Thermit; Jan 8, 2006 at 08:24.


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
  •