Make MYSQL Database Anonymous

Make MYSQL Database Anonymous

by Alan Cherwinski -
Number of replies: 3

Hello,

I have a graduate student interested in running analysis on typical Moodle installations.  He requested a copy of my entire SQL database

I am not dealing with sensitive institutional learner data (corporate training), but is there any safe and quickly way to make the users anonymous at a db level?

The only work around I thought of was to create a new site and import anonymised courses and history and then export that db.

Thanks


Alan

Average of ratings: -
In reply to Alan Cherwinski

Re: Make MYSQL Database Anonymous

by Ken Task -
Picture of Particularly helpful Moodlers

Don't think you want an anonymous MySQL user to be able to query remotely ... not even a system that contains non-sensitive data. Potential for *anyone* who can reach the DB server to possibly create a denial of service type attack.  

However, you could create a 'researcher' user in mysql and grant that user read only ... ie, no ability to change data.   User would have own password.

http://dev.mysql.com/doc/refman/5.1/en/adding-users.html

'spirit of sharing', Ken

In reply to Ken Task

Re: Make MYSQL Database Anonymous

by Alan Cherwinski -

Hi Ken,

Thanks. I was not going to provide access to the live db but a copy of the dump file at .sql. I can go through the .sql (text file) and alter all the user names and email addresses.  I could probably alter the table prefix.


Thanks

In reply to Alan Cherwinski

Re: Make MYSQL Database Anonymous

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

The is not a simple question.

The answer starts out simple. Obviously you start with columns of

  • mdl_user - name, email, description ...
  • mld_user_info_data - custom use profile field values, if any.
  • mdl_user_preferences - not sure if there will be personal information there, but you should check.
But, then you need to start thinking about what users did with the Moodle site. E.g. where there any personal discussions in any forums? If so, they need to be anonymised somehow.

Did any quiz/questionnaire/feedback/survey ask students to submit personal information? If so you need to clean that up.

Any personal comments in Moodle notes or messages?

And so on.

The normal approach to anonymising the data is to replace all the string values in certain columns with random strings.