3

When I select from a table that doesn't exist: Missing table

When I select a nonexistent column from an existing table: Missing column

I used to receive meaningful error messages (ie 'Error Code: 1054. Unknown column 'column' in 'table''), but now only the error number is returned, without an explanation of what happened. This happens to everyone that connect to this particular MySQL database.

Does anyone know how I can fix this without reinstalling MySQL? I'm running MySQL 5.7.9 Community Server (64-bit) on Windows Server 2012.

4
  • As per the error codes coming out sensibly and I can see that from doc. Error: 1146 SQLSTATE: 42S02 (ER_NO_SUCH_TABLE) Message: Table '%s.%s' doesn't exist Error: 1054 SQLSTATE: 42S22 (ER_BAD_FIELD_ERROR) Message: Unknown column '%s' in '%s' What client you're using to connect? Can you confirm this from the cli?
    – mysql_user
    Commented Dec 8, 2015 at 2:56
  • what you get in error log file? Commented Dec 8, 2015 at 8:23
  • What version of what UI are you using?
    – Rick James
    Commented Dec 12, 2015 at 0:01
  • Already answered - forgot to mark my post answered :) Thanks, though!
    – Ryan Foley
    Commented Dec 12, 2015 at 0:02

3 Answers 3

1

Looking through the MySQL error log, I noticed the following line: Can't find error-message file '\share\errmsg.sys'. Check error-message file location and 'lc-messages-dir' configuration directive. That file did not exist, however \share\english\errmsg.sys did exist. I found out from here that this error message is not entirely accurate, since MySQL does not actually look in the \share\ directory - it looks in the \share\*YOUR LANGUAGE*\ directory.

I looked in my my.ini and discovered that I had a line that said basedir = (that's all that the line said - there was no path after basedir). I'm not entirely sure how that configuration came to be, but I commented out that line and everything works great now!

1

On Ubuntu, the problem is that the lc-messages-dir=/usr/share/mysql/English/ (English with an uppercase 'E') while the folders at the time of installation were all 'english' with a lowercase 'e'.

For me, the error output was limited to the error codes only. No error text whatsoever. Changing the directory (either in the startup options or renaming to 'E' is what fixes it.)

0

The best answer is to setup correctly the lc-message-dir into your mysql.cnf :

lc-messages-dir = /usr/share/mysql/english/

And error messages will be back ;)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.