MySQL Forums
Forum List  »  General

access denied and --login-path
Posted by: Emanuele Granucci
Date: October 20, 2013 07:19AM

Server version: 5.6.11 MySQL Community Server (GPL)
Cannot understand the following behaviour.

To execute code on command line, without password, I configured an alias by the command

mysql_config_editor set --login-path=my_maint --host=localhost --user=myusr --password


Suppose I have a file "do_something.sql" with sql code inside.
Trying to do that, I receive "Access denied" error:

# mysql --login-path=my_maint < do_something.sql
ERROR 1045 (28000) at line 2: Access denied for user 'myusr'@'localhost' (using password: YES)


but only if I redirect standard input.
Same command without redirection gives no error and logs in correctly:

# mysql --login-path=my_maint
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 202087
Server version: 5.6.11 MySQL Community Server (GPL)

Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>

Options: ReplyQuote


Subject
Written By
Posted
access denied and --login-path
October 20, 2013 07:19AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.