Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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.
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.
Thanks for ur replay
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.
The CREATE privilege enables creation of new databases and tables.
The DROP privilege enables you to drop (remove) existing databases, tables, and views.
Hi Pan64
I want user can create the database and he should not able to delete the database, but he should able to delete tables.
he should not able to delete the database, but he should able to delete tables.
Did you actually READ any of the pages on permissions, there is no such permission to allow this. Let me make it clear: YOU CAN NOT GIVE A USER PERMISSIONS TO DROP JUST TABLES.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.