Access denied for 'root'@'%' when loading files from my computer

44 Views Asked by At

I've logged in and accessed my database and can insert data manually into my newly created table but when I try load a .csv file from my desktop I get the error: "Access denied for user 'root'@'%' (using password: YES)

I'm assuming this means I don't have access to my own files or something? Really stuck.

1

There are 1 best solutions below

3
On

Keep in mind that user root@% is different from user root@localhost. I'm assuming that you are accessing the server locally, then trying to gain access from your desktop machine.

You will need to grant access to your desktop machine using the GRANT command.

i.e.

grant all on * . * to 'root'@'%' identified by 'password'