I'm using mysqlimport to replace data in a table with values from a TSV file. Everything is working fine (importing data using the DB superuser name and password), so now I want to lock it down so that the database user doing the import can only affect the single table I want to replace.
I know I need to grant FILE on . in order to use "LOAD DATA INFILE" (which mysqlimport wraps), but I'm having trouble finding the minimum set of permissions I can grant on the database.
I've tried;
grant FILE on *.* to ...
grant ALL on dbname.tablename to ....
But that gives me an error when I run mysqlimport;
mysqlimport: Error: Access denied for user ...
Does anyone know if it's possible to isolate the database so that only the relevant table can be altered by this user, or do I have to allow them broader access to make the mysqlimport possible?
FILE
is NOT inALL
? It's a bit of a misnomer. Then again, if you get an access denied, it fails on either username, host, or password before that. – Nigrosine