I've have a MySQL server that is used in conjunction with a PHP enabled web-server, and ther are several users on the system.
In the past I've used the following SQL to create databases and users:
> CREATE DATABASE something;
> GRANT ALL ON something.* TO someone@localhost IDENTIFIED BY 'password';
I've recently realized that this is less than optimal, because in
phpmyadmin it allows each user to see all the other databases on the
system, instead of just the ones they have access to. I've decided
that I will change the GRANT command as such:
> GRANT ALL PRIVILEGES ON something.* TO someone@localhost IDENTIFIED BY 'password';
My problem is, I've already created a bunch of users with the older query, and I need to know what I must change in order to restrict these user to only the databases they have access to. Is there a way to do this without deleting each user and recreating them using the improved query string? Say, issuing an UPDATE command?