Take the 2-minute tour ×
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. It's 100% free, no registration required.

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
add comment

1 Answer

up vote 1 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:

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

Your Answer

 
discard

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.