Gossamer Forum
Home : Products : Others : MySQLMan :

Adding a new user to mysql

Quote Reply
Adding a new user to mysql
Hello,
Sorry for the basic question, and I did do a search, but the info I found was confusing at best to me.

Im hoping someone can just give me the plain english text commands that I can use in telnet to add a new user for a mysql database.

Heres what I want to do:

1. Add a new user to have access to a mysql database
2. We'll call the database alice and the user is joe
So, what command do I give at the root telnet prompt to give joe access ONLY to the database alice that would give joe full permissions to manipulate the alice database only, including adding new tables, dropping tables, searching tables, indexing tables etc. I dont want joe user to be able to grant others permission to do anything, nor for joe user to add new databases on the mysql server.

Can someone please give me the complete mysql command to do that.

Thanks, for ever in your debt.
Harrison

"I've got if's pretty good, but that's about it"
Quote Reply
Re: Adding a new user to mysql In reply to
Hi,

I'm about to search the forum with a not dissimilar query, however I'm not sure if you might have seen the mysql info at this URL, which I believe may help to some degree...

http://www.devshed.com/Server_Side/MySQL/

It may be a bit basic to begin, but I think it addresses your question.

Now if this is way off your needs, I apologise, but I'm also trying to find some clear instructions on how to do this for individual users/virtual sites on a RaQ3.

Cheers.



Quote Reply
Re: Adding a new user to mysql In reply to
Hi,

See the GRANT syntax:

GRANT ALL ON alice.* TO joe@localhost IDENTIFIED BY 'joespassword'

would do the trick.

Cheers,

Alex

--
Gossamer Threads Inc.
Quote Reply
Re: Adding a new user to mysql In reply to
Thanks, and though I dont know enough, I'll ask anyway, Wouldn't that grant all permissions to joe, including the grant permission so joe could then grant someone else access to the mysql server as well as create other databases?

I would want joe to have permission to use his own database anyway he sees fit, but not to access anyone elses database, through the web like phpmyadmin or through ssh or telnet.

Is this possible?

Thanks,


"I've got if's pretty good, but that's about it"
Quote Reply
Re: Adding a new user to mysql In reply to
They could grant permissions to other people, but only to their own database, not to anything else.

Cheers,

Alex

--
Gossamer Threads Inc.