Portal Home > Knowledgebase > Articles Database > Users that only see their databases, How?
Users that only see their databases, How?
Posted by filete, 09-02-2009, 07:46 PM |
Hi!
I have create a user with these privileges:
SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, FILE, INDEX, ALTER,
CREATE TEMPORARY TABLES, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EXECUTE
Now, when the user access with Cpanel to his account, he can see his databases,
and can work fine with the permissions it has.
But if the same user connect thru SSH and query the "Show databases" command,
it gets all the databases the system have, same as root user.
How can I change that, so it can only see his databases?
Thanks!
|
Posted by NicAddress, 09-02-2009, 08:07 PM |
safe-show-database in my.cnf?
|
Posted by filete, 09-02-2009, 08:15 PM |
you mean to edit the .cnf file?
And what´s the specific line?
|
Posted by nomankhn, 09-03-2009, 06:04 AM |
I hope it helps. Between regarding cpanel can you tell me please your mysql version?
Last edited by nomankhn; 09-03-2009 at 06:15 AM.
|
Posted by odishahost, 09-03-2009, 12:38 PM |
remove the privileges of the user and add it again through ssh.
flush privileges to reload the grant tables.
make sure you are not accessing mysql as root user through ssh.
check if the user has a .my.cnf with user = root.
|
Posted by filete, 09-03-2009, 08:04 PM |
Yes, whats on the user my.cnf file is:
[mysqld]
set-variable = max_connections=500
safe-show-database
Strange, cause if I don´t give Admin (Show Databases) privilege,
how come the user can see all the databases thru SSH with their account.
Is this some kind of mySQL bug ?
Can´t be the version cause this is happening in my production server
using mySQL 4.1.22 version, but I have tested on my development OSX server
that have the latest mySQL version (5.0.67) and same happens.
Also it can´t be by giving privileges with phpMyAdmin, cause
I have test the 2 ways, with SSH line code.
Any idea?
|
Add to Favourites Print this Article
Also Read