List:General Discussion« Previous MessageNext Message »
From:Steve Edberg Date:June 5 2002 12:28pm
Subject:Re: System Table
View as plain text  
Take a look at the 'mysql' database; the relevant tables are 'user' and 'ub'.

See:
	http://www.mysql.com/doc/P/r/Privileges.html
And
	http://www.mysql.com/doc/P/r/Privilege_system.html
	http://www.mysql.com/doc/U/s/User_Account_Management.html

If your naming scheme is to name the private database after the user, 
just do something like

	select count(*) from db where Db='<insert username here>'

I just remembered - there's also a username field ('User') associated 
with each db in the db table...

	-steve


At 11:53 AM +0100 6/5/02, Niall Merrigan wrote:
>Hi List
>
>I am just wondering is there a sysusers / systables  table in mySQL (like
>SQL Server).
>
>I am creating an multi user script whereby users will be able to create
>their own db on a linux box, but I will be only allowing one database per
>user.  I would like to do a lookup on a system table if it exists or if it
>doesnt I will create a table to model this.
>
>Thanks
>
>Niall
>
>
>
>Niall Merrigan			ASP Development Engineer
>Piercom Ltd, Holland Road, National Technological Park, Limerick
>
>http://www.piercom.ie		http://nm.csn.ul.ie
>Phone: +353-61-201917		Fax: +353-61-355051
>


-- 
+------------------------------------------------------------------------+
| Steve Edberg                                      sbedberg@stripped |
| University of California, Davis                          (530)754-9127 |
| Programming/Database/SysAdmin               http://pgfsun.ucdavis.edu/ |
+------------------------------------------------------------------------+
| "If only life would imitate toys."                                     |
|                  - Ted Raimi, March 2002                               |
|                  - http://www.whoosh.org/issue67/friends67a.html#raimi |
+------------------------------------------------------------------------+
Thread
System TableNiall Merrigan5 Jun
  • RE: System TableCal Evans5 Jun
  • Re: System TableSteve Edberg5 Jun
  • Re: System TableVictoria Reznichenko5 Jun