Tip: Getting rid of the warning "The column name 'start' is a MySQL reserved keyword."

Version 4 and later of popular database management tool phpMyAdmin "helpfully" displays warnings when a column name in a database conflicts with a reserved word in MySQL. This may or may not be an actual problem. If you are in the habit of enclosing table names in your SQL queries in `backticks`, it shouldn't be a problem at all. For others, it may depend on the actual column name. In the example provided below, "start" and "end" can safely be SELECTed unquoted, whereas "group" needs the backticks. At any rate, having the warnings show up the whole time rather than just at table creation time is annoying. Here's how to disable them.

phpMyAdmin showing 3 warnings about column names that are reserved keywords in MySQL

As phpMyAdmin 4 is new, it took some searching before I found how to disable it. Suppressing these warnings can be done by adding a single line to your config.inc.php:

<?php$cfg['ReservedWordDisableWarning'] = true;?>

That's all there is to it.

Source: phpMyAdmin documentation — Configuration

Comments

No comments, yet...

Post a comment