MySQL Table Does Not Exist Error, But It Does Exist

Table does not exist, but it does exist

Your query has several syntax errors including wrong JOINs and accessing your columns with/without backticks inconsistently.

I've tried to improve it and here it is:

SELECT 
c.`FirstName`, c.`LastName`, c.`Street`, c.`Apartment`, c.`City`,
c.`State`, c.`zip`, c.`Homephone`, c.`Cellphone`, c.`Otherphone`,
d.`name`, d.`Description`, d.`price`,
so.`DonutOrderID`, d.`DonutID`, so.`specialNotes`, c.`CustomerID`, o.`date`
FROM `SalesOrder` so
INNER JOIN `SalesOrderDetails` sod ON so.`DonutOrderID` = sod.`DonutOrderID`
INNER JOIN `Customer` c ON so.`CustomerID` = c.`CustomerID`
INNER JOIN `Donut` d ON d.`DonutID` = sod.`DonutID`

MySQL Table does not exist error, but it does exist

Basically, I believe the problem that I was experiencing was due to differing password hash lengths. In my case, I got a new server, did a complete mysql dump on it which transferred passwords and user info also. The new server was already initialized with a root user that had a 16char length hash, but my old server was using the newer 32 char hash lengths.

I had to go into my.conf set the old passwords setting to 0 (other wise every time I tried updating the database, the new update was 16 chars in length). I then updated all the passwords to be the same via the command UPDATE mysql.user SET password=PASSWORD('password here');, then I flushed privileges.

Obviously, having every user with the same password is a really bad idea, so I changed them one by one after I confirmed that it was working.

I typed up a blog entry that goes into some of the other things I did that didn't work here, before I happened upon this solution (just in case one or more of those changes effected my outcome) however, I think that the above solution to be complete... but I haven't tried to reproduce the error so I can't be 100% sure.

Try to describe my table but it said does not exist this table however it does

Somehow you managed to create tables with wrong quotes attached.

There is a table in your DB called

’cms_news‘  

but you search for

cms_news

Rename (or delete) all your tables and don't use to escape names. Use backticks if you have to:

`cms_news`

But even backticks are only required for table names containing special characters or using reserved names in the DB.



Related Topics



Leave a reply



Submit