News for hackers. Stuff that matters.
Re:How I Fired Myself by arethuza on Wednesday February 27, 2013 @11:11AM (#5293046)
Out of interest, why not create a database user account that is read only and use that?
Re:How I Fired Myself by hackoder on Wednesday February 27, 2013 @11:24AM (#5293137)
It was a bunch of different tasks. For some, we did use a read only account. Other tasks (updating top 10 scores, updating the users table with their geo-ip based location etc) required write access.

Just to add some more thoughts based on other comments.. yes a lot of companies do stuff like this, particularly startups. The upside in these situations is that you end up learning things extremely quickly which wouldn't be possible in a more controlled environment. However not having backup and restore working is just ridiculous and I keep shaking my head at how they blamed the OP for this mistake. Unbelievable.

Re:How I Fired Myself by petriw on Wednesday February 27, 2013 @11:24AM (#5293138)
Just remember to always verify it's still read only.

Or a coworker will find the login in your scripts, repurpose it, then notice they need more rights and "fix" the account for you.

Re:How I Fired Myself by MBCook on Wednesday February 27, 2013 @11:43AM (#5293242)
Plus read-only isn't a guarantee. You can't write data, but you can run a bad select or join that ends up effectively locking the database.

SELECT * FROM my_200_GB_table will always be there.

Re:How I Fired Myself by michaelt on Thursday February 28, 2013 @12:59PM (#5299912)
Why should a select or join lock a database? Surely no database lets one query starve another of IO or CPU?
Re:How I Fired Myself by mst on Wednesday February 27, 2013 @12:29PM (#5293561)
I like to suffix such account names with _readonly.
Re:How I Fired Myself by arethuza on Wednesday February 27, 2013 @12:23PM (#5293514)
"find the login in your scripts"

It's actually quite nice using a database server that doesn't require explicit credentials to be used.