Page MenuHomePhabricator

Drop database s54020__wsexporttest_p and grant access to Quarry
Closed, ResolvedPublic

Description

I accidentally created s54020__wsexporttest_p when I already had s54020__wsexport_test_p.

Could the one without the underscore please be dropped? Thanks.

drop database `s54020__wsexporttest_p`;

By the way, should Quarry be able to access the tools' databases when they have a _p suffix? I'm getting "Access denied for user 's52788'@'%' to database 's54020__wsexport_test_p'". Is it possible to give it access to both databases?

grant select on s52561__wsexport_p.* to 's52788'@'%';
grant select on s54020__wsexport_test_p.* to 's52788'@'%';

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 20 2019, 3:10 AM
Samwilson renamed this task from Drop database s54020__wsexporttest_p to Drop database s54020__wsexporttest_p and grant access to Quarry.Aug 20 2019, 10:07 PM
Samwilson updated the task description. (Show Details)
Zdzislaw updated the task description. (Show Details)Aug 20 2019, 11:01 PM
Samwilson updated the task description. (Show Details)Aug 29 2019, 9:46 AM
Samwilson updated the task description. (Show Details)Aug 29 2019, 10:21 AM
zhuyifei1999 added a subscriber: zhuyifei1999.

By the way, should Quarry be able to access the tools' databases when they have a _p suffix? I'm getting "Access denied for user 's52788'@'%' to database 's54020__wsexport_test_p'". Is it possible to give it access to both databases?

Not at the moment. T173511 did not go anywhere.

Mentioned in SAL (#wikimedia-cloud) [2019-08-30T16:19:24Z] <bd808> drop database s54020__wsexporttest_p; (T230758)

bd808 added a subscriber: bd808.Aug 30 2019, 4:21 PM
$ sudo become wsexporttest
$ sql toolsdb
...
MariaDB [(none)]> drop database `s54020__wsexporttest_p`;
Query OK, 0 rows affected (0.01 sec)

MariaDB [s54020__wsexport_test_p]> use s54020__wsexporttest_p;
ERROR 1049 (42000): Unknown database 's54020__wsexporttest_p'

I thought you should be able to do this as the tool account, but I wasn't 100% sure so I tried it. Turns out that yes a tool account has the ability to drop databases it has created.

bd808 closed this task as Resolved.Aug 30 2019, 4:23 PM
bd808 claimed this task.

Marking this as resolved. As noted in T230758#5451604 the second ask to expose a toolsdb database to quarry is not currently possible. Quarry only knows how to talk with the Wiki Replica servers and we have no system for replicating user curated data to those servers.

I am sure I tried to do drop it myself before creating this task! I think I didn't try hard enough. Sorry to waste your time. :) Thanks for sorting it out, and thanks both of you for the information about Quarry access. (For the wsexport tool, we'll build custom reports of the data.)