Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

mysqlimport: Error: 1045, Access denied

Tags:

Does anyone know why I get this error when running mysqlimport?

mysqlimport -u someone -pwhatever --columns=a,b,c,d,e bar /var/tmp/baz.sql mysqlimport: Error: 1045, Access denied for user 'someone'@'%' (using password: YES), when using table: baz 

However...

mysql -u someone -pwhatever Welcome to the MySQL monitor.  Commands end with ; or \g. Your MySQL connection id is 199 Server version: 5.1.41-3ubuntu12.10 (Ubuntu)  Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.  mysql> show grants; +------------------------------------------------------------------------------------------------------------+ | Grants for someone@%                                                                                   | +------------------------------------------------------------------------------------------------------------+ | GRANT USAGE ON *.* TO 'someone'@'%' IDENTIFIED BY PASSWORD '*BLAHBLAHBLAH' | | GRANT ALL PRIVILEGES ON `bar`.* TO 'someone'@'%'                                          | +------------------------------------------------------------------------------------------------------------+ 2 rows in set (0.00 sec)  mysql> 
like image 508
Mike Conigliaro Avatar asked Jul 26 '11 21:07

Mike Conigliaro


People also ask

How do I fix error 1045 28000 Access denied?

Set root user password Login as user root with blank password >mysql -u root mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'abc';

How do I fix Mysql access denied error?

To resolve the error, you must create a user with the following command: mysql> GRANT ALL ON *. * to user_name@localhost IDENTIFIED BY 'password'; Replace user_name with the user's username and password with the user's password.


1 Answers

You can avoid the need for the extra privileges by using the --local parameter to mysqlimport:

--local, -L             Read input files locally from the client host. 
like image 99
Omry Yadan Avatar answered Sep 18 '22 05:09

Omry Yadan