racker :)
04-14-2001, 05:19 PM
How do i guve a user his own database
ive created a dtabase:
tets
ive created a user:test
pass:test1
now how do i make it like the database test is owne dby the user test???
i tried grant but it didnt work
thsi is what i type
GRANT ALL ON test.*TO test
it didnt worl
smeone help
thanx a lot :)
cya l8r
Žacker
Gilby
04-14-2001, 05:40 PM
GRANT ALL PRIVILEGES ON test.* TO test@localhost IDENTIFIED BY 'test1';
brandonk
04-14-2001, 06:00 PM
Here are full instructions that I grabbed from somewhere else if anyone needs them:
telnet to the machine
mysqladmin -uroot -p####### create newdbname
mysql -uroot -p####### mysql
insert into user (Host,User,Password) VALUES ('localhost','username',PASSWORD('newpass'));
insert into db values('localhost','newdbname','username','Y','Y','Y','Y','Y','Y','N','Y','Y','Y');
flush privileges;
SI-Chris
04-14-2001, 10:01 PM
Originally posted by racker :)
...
GRANT ALL ON test.*TO test
it didnt worl
...
Don't forget you need a semicolon on the end of commands. One of these -> ;
There should be a mysql_setpermissions script, usually in /usr/bin/
This script can help you set up permissions if the grant statements are not working. The script will walk you through all of the steps you need to give a user perssion to the database of our choice.
Chicken
04-15-2001, 12:52 PM
Originally posted by brandonk
Here are full instructions that I grabbed from somewhere else if anyone needs them:
telnet to the machine
mysqladmin -uroot -p####### create newdbname
mysql -uroot -p####### mysql
insert into user (Host,User,Password) VALUES ('localhost','username',PASSWORD('newpass'));
insert into db values('localhost','newdbname','username','Y','Y','Y','Y','Y','Y','N','Y','Y','Y');
flush privileges;
Now I've really never tried to figure this out all that much, bad I know, but for the mySQLily challenged...
All I have is the root user set up. So this would create a new user and give them a db to work with correct? SO a sample of this might be:
(####### = my root mySQL password)
telnet to the machine
mysqladmin -uroot -p####### create dbofbob
mysql -uroot -p####### mysql
insert into user (Host,User,Password) VALUES ('localhost','bob',passofbob('newpass'));
insert into db values('localhost','dofbob','bob','Y','Y','Y','Y','Y','Y','N','Y','Y','Y');
flush privileges;
-or am I missing something? I get the feeling I mucked something up above.
Woofcat
04-15-2001, 02:05 PM
Grant is much easier...
http://www.mysql.com/doc/A/d/Adding_users.html
racker :)
04-15-2001, 02:10 PM
chicken use the the grant statement that gilby posted
GRANT ALL PRIVILEGES ON test.* TO test@localhost IDENTIFIED BY 'test1';
i think the one brandok has given is for the linux mysql
could be my mistake
nywayz
thanX a|| :)
cya arnd
Žacker