View Single Post
  #7 (permalink)  
Old 07-30-2007, 02:04 AM
TeraTask's Avatar
TeraTask TeraTask is offline
PT Admin
Awards Showcase
Quality Tutorial Quality Tutorial Quality Tutorial 
Total Awards: 3
Join Date: Jun 2007
Location: Reno, NV
Posts: 440
iTrader: (0)
TeraTask is a splendid one to beholdTeraTask is a splendid one to beholdTeraTask is a splendid one to beholdTeraTask is a splendid one to beholdTeraTask is a splendid one to beholdTeraTask is a splendid one to behold
OK. Here's how it goes, HelloWorld:

1) You have users.
2) You have databases.
3) You have tables.

1 user can have access to 0 or more databases. Each database can have 0 or more tables.

You first connect to MySQL using your user. Since the user can access a number of databases, you must then tell MySQL which database you want to use (this user must have access to that database). After you have connected and indicated the database you can then perform operations on the selected database (such as creating a table).

This type of setup has a nice advantage - users can have limited privileges on a database to protect the database from undesired changes by that user (root, for example, can do whatever it wants, but you don't want any ole user to be able to have that same power).

__________________
Jeremy Miller
Content Farmer - Optimized Automated Blog Posting

Digg this Post! Del.Icio.Us this Post! Technorati this Post! Furl this Post! Mister Wong this Post! Newsvine this Post! Spurl this Post! Reddit this Post! Netscape this Post!
Reply With Quote