Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I updated mysql recently and found problem related to privileges and backup. When I am using mysql_upgrade command it says-

mysqlcheck: Got error: 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 '.`'`  FOR UPGRADE' at line 1 when executing 'CHECK TABLE ...  FOR UPGRADE'

I searched this problem and found that this problem is due to use of delimeter in table_name and If I alter the name of table then this can be solved. But I don't know how to search those table which are not ready to upgrade ?

share|improve this question
up vote 3 down vote accepted

Given that the valid characters for unquoted identifier characters are documented here, you should be able to find non-confirming table names in information_schema using a regular expression match, with this query:

  FROM information_schema.tables
 WHERE table_name NOT RLIKE '^[0-9a-zA-Z$_]+$';
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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