novice in mysql here .
I have a database created in mysql called 'productes' and 'productos' is one of the database tables.
Productos has the following columns :
CREATE TABLE Productos
(
IdProducto INT NOT NULL AUTO_INCREMENT,
NombreProducto CHAR(40) NOT NULL,
IdProveedor INT,
IdCategoria INT,
PrecioUnidad DECIMAL(20,4),
UnidadesEnExistenci SMALLINT,
Suspendido TINYINT,
KEY (IdCategoria),
KEY (IdCategoria),
KEY (IdProveedor),
KEY (NombreProducto),
PRIMARY KEY (IdProducto),
KEY (IdProveedor)
);
What I tried to do as root user from the command line was the following :
mysql>GRANT USAGE (PrecioUnidad) ON productes.productos TO pepe@'%' IDENTIFIED BY
'pepe';
(i.e deny all access to user 'pepe' from all the domain machines to the column 'PrecioUnidad' of the table productos )
And I got an error(ERROR 1064) saying that I have an error in my syntax .
I thought to grant privileges to the rest of the columns of the table and exclude the specific one to get the desired result but I thought that maybe there is another way .
So my question is this : Can grant usage be applied for a specific column table and I'm just missing something here , or is there another way to disallow all privileges for only one column table ?