What environment check issue? The post to which you replied was about an environment check error report that occurs when Moodle is unable to read an xml file -- a text file -- which has nothing to do with the database. How could a database query make an I/O problem with a text file go away?
If, on the other hand, the environment check issue you are talking about is the check for a Unicode database, I thought that's what the SHOW VARIABLES query problem was about in the first place. What else is the fix for, besides the environment check of the database for Unicode?