How do I mark a user as admin in mysql

1

I am building a ruby on rails application using mysql for storing application related data. My application has a user console and admin console. Access to admin console is restricted to administrators. How do I mark a user as admin in mysql database.

ardsrk

Posted 2010-11-13T16:30:29.343

Reputation: 113

Dunno. How does your application determine that someone is an admin? – Ignacio Vazquez-Abrams – 2010-11-13T16:36:22.023

Thanks. I thought it was a mysql configuration. Didn't know it was application dependent. – ardsrk – 2010-11-13T17:13:46.280

Answers

1

Easy to mark a user as admin inside of mysql -
add another mysql user as documented here: http://dev.mysql.com/doc/refman/5.1/en/adding-users.html
and grant them appropriate permissions as documented here: http://dev.mysql.com/doc/refman/5.1/en/grant.html

as to connecting to the database as separate users, that's another ball of wax with overriding methods...

or are you talking about making an admin flag in the users table...that's a column with the boolean type

RobotHumans

Posted 2010-11-13T16:30:29.343

Reputation: 5 758