Forums

ERROR 1045 (28000): Access denied for user 'username'@'%' (using password: YES)

I am using MySQL for the first time. I am running it in the pythonanywhere console. I was able to create some schema's but when i try to load data into the database i get an access denied error.

I used this code:

LOAD DATA 
INFILE '/home/username/data.tsv' 
INTO TABLE table
FIELDS TERMINATED BY '\t'
LINES TERMINATED BY '\n';

And got this error:

ERROR 1045 (28000): Access denied for user 'username'@'%' (using password: YES)

when googling for solutions I got similar errors with commands like this:

SELECT user, host FROM mysql.user 
>>> ERROR 1142 (42000): SELECT command denied to user 'username'@'10.0.0.44' for table 'user'

Can anybody help me solve this/tell me what I did wrong?

See our help page on how to use LOAD DATA INFILE on PythonAnywhere.

You cannot access the mysql.user table on PythonAnywhere, because that is a shared table that is only available to admins.

Thanks, this helped . I tried to find the answer on google and stackoverflow, but I couldn't this help page. I asked the same question on stackoverfow and posted a link to the help page as an answer, to make this page more findable.