Sunday, 14 August 2016

Access denied for user@localhost when trying to import database in Workbench

I'm trying to import a database in Workbench, in localhost. I select the file (it's actyally a csv file) and when I click on "start import" I get this error:



Operation failed with exitcode 1

09:51:12 Restoring /home/carlo/Downloads/db_export.csv
Running: mysql --defaults-extra-file="/tmp/tmpt_73Sg/extraparams.cnf" --host=127.0.0.1 --user=carlo --port=3306 --default-character-set=utf8 --comments < "/home/carlo/Downloads/db_export.csv"
ERROR 1045 (28000): Access denied for user 'carlo'@'localhost' (using password: YES)


The problem seems to be the password, but I'm sure I'm inserting it correctly. Also, before clicking on "start import" I'm asked for the password to connect and it works. What could be wrong?



I created my user from the mysql shell client, following the instructions on the mysql website, like this:



CREATE USER 'carlo'@'localhost' IDENTIFIED BY 'carlo';

GRANT ALL PRIVILEGES ON *.* TO 'carlo'@'localhost' WITH GRANT OPTION;
CREATE USER 'carlo'@'%' IDENTIFIED BY 'carlo';
GRANT ALL PRIVILEGES ON *.* TO 'carlo'@'%' WITH GRANT OPTION;

No comments:

Post a Comment

c++ - Does curly brackets matter for empty constructor?

Those brackets declare an empty, inline constructor. In that case, with them, the constructor does exist, it merely does nothing more than t...