Looking for a specific table in mysql or mongo

Skip to first unread message

Pierre Mailhot

Dec 23, 2014, 11:28:35 AM12/23/14
to opene...@googlegroups.com
This is a very specific issue, but for the life of me I can't find the table where the information about a user would still be.

On a test machine, I attempted to delete a user by removing traces of that users in the following tables under mysql:

delete from user_api_userpreference where user_id=34;

delete from auth_userprofile where user_id=34;

delete from auth_registration where user_id=34

delete from auth_user where id=34;

But when I try to recreate a user with the same username, I get the following message about the user already existing in the forum: CommentClientRequestError : u'["Username is already taken"]' 

My question is: what is the name of the table that still contains information about that username?

Thanks for any information.

Carson Gee

Dec 23, 2014, 11:39:13 AM12/23/14
to opene...@googlegroups.com

We have run into this issue quite a bit as there isn’t really an API for deleting users in the forums that I’m aware of. By default, the user database for the cs_comments_service is in mongo under the cs_comments_service database and the users collection. You can remove with something like:

use cs_comments_service
db.users.remove({username: "jimbo"})

You received this message because you are subscribed to the Google Groups "Open edX operations" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openedx-ops...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Pierre Mailhot

Dec 23, 2014, 11:45:30 AM12/23/14
to opene...@googlegroups.com
Thanks. You helped me solve my problem.

Since I am on a test machine, I am still using  cs_comments_service_development and not cs_comments_service.
I was looking under cs_comments_service and couldn't find my specific user. Now I know why :(

Thanks again. I have to remember this now :)
Reply all
Reply to author
0 new messages