majic.rs

  • blog
  • books
  • gallery
  • contact
  • about
Home › Blogs › Branko Majic's blog

Search

Gallery

Random Image

Botanique
 
 

Botanique

Recent blog posts

  • Always Innovating Touch Book, Part 2 - The Day After
  • Always Innovating Touch Book, Part 1 - First Impressions
  • Deco Theme and CSS Optimisation - Finally Solved
  • Problems with ejabberd (s2s connections failing)
  • We are Geeks
  • So-long reCAPTCHA
  • FOSDEM 2010
  • First Impressions After FOSDEM 2010
  • System-wide Installation of Certificates
  • Free Software - The Social Aspect
more

Links

GNU
FSF

Peragro Tempus

Jamendo
Jason's Website
Bakrachi

MySQL and Security

Branko Majic — 12. November 2009 - 22:13

It's weird how sometimes you can be taken by surprise when not delving deep enough when administering some software package. This can be particularly nasty when it's related to the security of the system.

Some days ago I was rather surprised when one of the developers at the work reported that permission grants he was assigning to a database are being ignored. To be more precise, users without specified privileges were able to actually work on a MySQL database without being prior permission.

Of course, I was very sceptical about the report, so I tried creating a new database on the machine, and tried to access it as a user which wasn't granted any permissions. And, as I expected, it didn't work. The user's access to database was declined. I went back to work thinking the colleague had made a type or something.

In five minutes he called again, and it turned out to be a database called 'test'. Once again I tried the whole procedure, this time using that database, and what do you know - he was right.

To cut the thing short, I've found out in the end that the problem was that for some sick reason, by default, the MySQL creates the 'test' database, and grants everyone the right to do whatever they can with it. After some research I've found a nice article at SecurityFocus which helped me solve the issue at hand. What I was most baffled about is that I really haven't ever ran into articles describing this kind of behaviour (maybe I was just too lazy to read stuff in details?).

In the end, the good thing is that now I know what to look out for in the future.

  • Technology
  • database
  • security
  • software
  • Branko Majic's blog
  • Add new comment

Powered by Drupal, an open source content management system
  • blog
  • books
  • gallery
  • contact
  • about

Copyright (C) 2009 Branko Majic. Verbatim copying and distribution of this entire article are permitted worldwide, without royalty, in any medium, provided this notice is preserved. Code snippets found throughout the articles are licensed under GPLv3 or later.