Briefly:

<http://dev.mysql.com/doc/mysql/en/GRANT.html>

GRANT ALL PRIVILEGES ON dbname.* TO user IDENTIFIED BY 'userspass';
CREATE DATABASE dbname;
\q

mysql -u user -p dbname
Password: userspass
mysql>

NEVER *EVER* run ANYTHING using root. That's an administrative only user. Some applications may not even need a grant all privileges for their database, many only require select, lock, update, after the table structure is loaded they don't need to drop/add tables. Don't just do a grant all privileges * to someone either because then they can read, write, and DROP anyones tables or databases.


--On Sunday, June 13, 2004 17:17 -0400 Guy Merritt <[EMAIL PROTECTED]> wrote:


I have zero experience, really, with Mysql although I compiled it on a
Linux box and it works well for a couple of sites and messageboards that
I host from my house.  I do this strictly for fun and would like to let
some friends and family members have websites as well.

Here's what I don't get (well, a tiny protion of what I don't get): when
I paid for webhosting I could set up a php messageboard and (if I recall
correctly) and I was issued a unique username and password for the mysql
database.  As it is now, I am required to use my root account and
username - and use a different prefix for each instance of phpBB2 (a
messageboard) when I install something.  Is there a way that users can
have sectors, or tables, or whatever that are allocated to them and which
they access with their own usernames and passwords?

I know I can change my password with /.mysqadmin -u root password
my_password - I know of few basics and that's it. And it does work fine -
I just don't want to pass out the root account password to people to let
them have access for a messageboard or whatever...

Thanks

Guy Merritt



-- Michael Loftis Modwest Sr. Systems Administrator Powerful, Affordable Web Hosting

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to