I am a relatively new user to MySQL running version 4.0.17 on MacOS X
10.3.3 (this is the "current version" installed by the Fink package
manager).
I login to mysql as root
mysql -u root -p
and issue the following commands:
CREATE DATABASE MAPS;
GRANT ALL ON maps.* TO creator@localhost;
FLUSH PRIVILEGES;
use MAPS;
CREATE TABLE Pproto [I have "clipped" the full command here]
Then I login to mysql as user creator (which has no password)
mysql -h localhost -u creator maps
and type the following:
CREATE TABLE P001 AS SELECT * FROM Pproto;
ALTER TABLE P001 ADD PRIMARY KEY (starnumO);
LOAD DATA INFILE '/path_to/P001.in' INTO TABLE P001 FIELDS TERMINATED BY
' ' LINES TERMINATED BY '\n';"
At which point the space delimited file at /path_to/P001.in (which is
readable by all readers) fails to be read in with the following error:
ERROR 1045 at line 1: Access denied for user: 'creator@localhost' (Using
password: NO)
Why am I getting a usage error. User 'creator@localhost' should have
all privileges on the maps.* tables, and I can create and alter them,
but "FILES" privilege doesn't appear to have been granted to 'creator'.
Juan