Grant FILE privilegies
Hello, I have a client trying to create a .csv file from his database
SELECT 'CLASE','DESCRIPCION','% VENTA','% COSTO','ACTUALIZADO' UNION ALL SELECT clase,descla,pctven,pctcos,fecact INTO OUTFILE '/home/tsrc1024/public_html/web/reportes/prueba.csv' FIELDS TERMINATED BY ';' LINES TERMINATED BY '\r\n' FROM web03 WHERE rif='J294566243'
the error is
#1227 - Access denied. You need the File privilege for this operation (Usted necesita el privilegio FILE para esta operación
)
I tried in ssh as root:
mysql
>GRANT FILE ON *.* TO 'user'localhost
Query OK, 0 rows affected (0.00 sec)
But the error persists, also i found this is a security risk, is that right?
Any help is appreciated, thanks very much.
Regards.
JF
-
Note:
cPanel v. 12.0.10
Almalinux8
MySQL 8.0Thank you
0 -
Hey there! That Grant statement you ran as root wouldn't work, as that would need to be applied to a specific user. To see the permissions for a particular user you could run the following:
mysql -e "show grants for username@localhost;"
You will need to change out "username" for the specific cPanel user you are working with, assuming they are doing this under their main cPanel account.
If this is a database user that has been created inside cPanel, they may need to be recreated with the File privilege through the cPanel >> MySQL Databases page.
0 -
Hello, thanks very much for your answer!
Ok, I will try that and keep in contact.
Kind Regards
JF
1
Please sign in to leave a comment.
Comments
3 comments