Symptoms

Collect databases diskspace usage task fails with the following output:

Task ID 123456
Queue name  dbm_diskusage_52
Task name Collect databases diskspace usage for service 52
Task description    Collect databases diskspace usage for service 52
Parent task ID  4781901
Queue status Failed
Start not earlier than  Oct-29-2015 17:27
Method name taskExecuteServerOperation on SCREF:db.manager:0
Last execution output   
MySQL API error: SELECT command denied to user 'dbuser_100100'@'%' for column 'test_column' in table 'test_table'.

The following messages appear in osscore log:

Oct 29 17:27:44 mn.domain.tld : DBG [task:123456:232375 1:13534:b20ffb70 MySQL 1861467989]: [ MySQL] 10.10.0.10:mysql SELECT sum(data_length+index_length) AS total FROM information_schema.tables WHERE table_schema = 'db_100100'
Oct 29 17:27:44 mn.domain.tld : DBG [task:123456:232375 1:13534:b20ffb70 lib 1861467989]: [ MySQL] {module_id="Databases"; code="610"} MySQL API error: SELECT command denied to user 'dbuser_100100'@'%' for column 'test_column' in table 'test_table'.

Running the following command on the MySQL server fails:

mysql> SELECT * FROM information_schema.tables limit 1;
ERROR 1143 (42000): SELECT command denied to user 'dbuser_100100'@'%' for column 'test_column' in table 'test_table'

Cause

The behavior is recognized as POA-111804 (Views with incorrect SQL security context in mySQL lead to failed "Collect databases diskspace usage" task).

Resolution

In order to workaround the issue, the following actions should be performed:

  1. Check table status on the MySQL server

    mysql> use db_100100;
    mysql> show table status;
    ERROR 1143 (42000): SELECT command denied to user 'dbuser_100100'@'%' for column 'test_column' in table 'test_table'
    
  2. List views of the database

    mysql> show full tables in db_100100 where table_type not like '%table%';
    +---------------------+------------+
    | Tables_in_db_100100 | Table_type |
    +---------------------+------------+
    | test_view           | VIEW       |
    +---------------------+------------+
    
  3. Check the view

    mysql> select * From test_view;
    ERROR 1356 (HY000): View 'db_100100.test_view' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
    
  4. If case of the same error as in point 4, please follow 113106 KB-article

Internal content