--disable_abort_on_error --error 0,1396 DROP USER test_user@localhost; --error 0,1396 DROP USER test_user; CREATE USER test_user@localhost identified by 'PWD'; CREATE USER test_user identified by 'PWD'; # Establish the connection for test_user --replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK connect (test_user,localhost,test_user,PWD,test); # Who am I ? SELECT CURRENT_USER(); # test_user is able to SELECT columns of INFORMATION_SCHEMA.TABLES !! SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'INFORMATION_SCHEMA' ORDER BY TABLE_NAME; # test_user is allowed to get informations about the columns # of INFORMATION_SCHEMA.TABLES !! DESCRIBE INFORMATION_SCHEMA.TABLES; ############################################################################ # So why is test_user not able to get informations about the columns of # # the INFORMATION_SCHEMA tables via SELECT on INFORMATION_SCHEMA.COLUMNS ? # ############################################################################ SELECT DISTINCT(TABLE_NAME) FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = 'INFORMATION_SCHEMA' ORDER BY TABLE_NAME; # Cleanup connection default; DROP USER test_user@localhost; DROP USER test_user;