I have created an instance/database/tables and now want to load some data (.csv file) into a table. I get the error above when I try. If I remove the "LOCAL" option, I get a different message:
ERROR 1045 (28000): Access denied for user 'myconnected userID'@'%' (using password: YES)
I've tried all sort of things and just can't figure this out. I don't want (really can't do to the the nature of the raw input data) to use the 'import' as part of the Google Cloud SQL gui dashboard.
I've tried putting the csv file in the connected users home directory (/home/username/datadirectory/name.csv) and set the file and directory permissions to allow read/write access. That didn't help.
I set up a Cloud storage bucket, put the csv file there and changed the SQL LOAD command to reference the 'gs path' ... no luck.
I've tried some updates of mysql.user for to update File-priv = Y but that fails, UPDATE command denied. I tried the update as root as well as my userID.
UPDATE mysql.user SET File_priv = 'Y' WHERE Host = 'localhost' AND User = 'userID';
There has to be a way to allow for a csv file to be accessed and LOADED into a table.
Help!
Hi @Stonewater
Welcome to Google Cloud Community!
ERROR 1045 (28000): Access denied for user 'myconnected userID'@'%' (using password: YES)
Regarding this error, this has something to do with either the password of your myconnected userID or privilege issues. You need to change its password based on this Stack Overflow link.
You can also follow this documentation on setting the password for the default user account
root
user and then select Change password from the more actions menu (three dots). Consider the listed stipulations for the password, which are derived from the password policy set for the instance.Once the password has been changed, LOAD DATA INFILE
will now have the permission to carry out the query.