how to create a user in mysql server
hi,
In centos how to create a user in mysql server, the user can create the database but he should not able to delete that databases. Thanks suresh |
Come on, we aren't your search engine... http://lmgtfy.com/?q=how+to+create+a...n+mysql+server
|
you will have a dbadmin who has right to do anything. Either add users or add/revoke permissions to any db user. you can see here the privileges, so you can add create privilege, but do not add drop privilege.
|
how to create a user in mysql server
Quote:
I know how to creata a user, and i know that to search in google. here, I created a user, and logged into that user, but he can't able to create a database, so that i granted privileges to *.* to user@localhost, with this he can able to create the database but also he can delete that database. so that here i want to creata a user who can creata a database and he should not delete that database. Suresh |
In that case, please try to make make the effort to ask the right question in the first place, with a suitable amount of detail...
|
Quote:
|
so the next google you should have done would have got you here in seconds - http://dev.mysql.com/doc/refman/5.0/...html#priv_drop and you can see there is no specific "Drop database" privilege, you just permit create or drop on everything. so you can grant create and not drop, but that means they also couldn't drop tables, views etc.
more googling gets you here - http://bugs.mysql.com/bug.php?id=18938 where people are asking for a distinction between the types of drop. |
Quote:
If i do not add drop privilege to user then the user can able to drop their tables in database. i want user to drop tables. |
The CREATE privilege enables creation of new databases and tables.
The DROP privilege enables you to drop (remove) existing databases, tables, and views. |
Quote:
I want user can create the database and he should not able to delete the database, but he should able to delete tables. |
how did you configure the rights? What steps did you make?
|
Quote:
|
Quote:
FLUSH PRIVILEGES; |
try to revoke the drop privilege
|
Quote:
GRANT SELECT,INSERT,UPDATE,CREATE on suresh.* to 'suresh'@'localhost' identified by '123456'; FLUSH PRIVILEGES; |
All times are GMT -5. The time now is 06:36 AM. |