mySQL deny user access to database
Hey all,
New to mySQL, but trying to create users who are allowed only certain access to certain databases. Tried setting grants from terminal, as well setting permissions from phpmyAdmin. But for some reason all users have privileges to all databases. Can anyone help to provide me with just some basic commands to set up and database, and only allow access to a specific user? THanks!!! |
Regarding mysql access
Dear blizunt7
Would u please mention what command u used to grant a user specific access to a specific database ? I do believe to remedy the problem Subrun Jamil |
If you only want a user to have select permission; i.e., the user can see but not change any information, you can grant that with
Code:
grant select You must do this as the administrative user; i.e., mysql, using the password you set for user mysql -- save the above in a file, grant.sql or something and execute Code:
mysql --user=mysql --password=mysqlpassword < grant.sql Code:
grant all privileges See http://dev.mysql.com/doc/refman/5.0/en/grant.html |
Hey,
As root, I created the user, and created a database, and then granted that user all permissions on that database. But from phpmyadmin that user cannot create new databases. Code:
mysql> GRANT ALL ON database_name.* TO user@'%'; // host = % (null = any host) THanks much:) |
All times are GMT -5. The time now is 12:04 AM. |