MySQL Forums
Forum List  »  Newbie

Non Root user Loging works from command line ERROR 1045 from heredoc
Posted by: Joe Hawk
Date: January 23, 2019 02:55PM

I am running in Linux redhat 6.5 environment.
When I run the following from the command line I successful connect to the database with the furnished password and am able to select from the TEST (dbo) database tables.

${MYSQL_HOME}/mysql -u testuser -h127.0.0.1 -P 33060 –ptest123

When I run it from a shell like so:

${MYSQL_HOME}/mysql -u testuser -h127.0.0.1 -P 33060 –ptest123 << !

Select * from table1;

exit
!

I get the following:
ERROR 1045 (28000) at line 3: Access denied for user 'testuser'@'127.0.0.1' (using password: YES)

I have tried the following:

1) Grant usage on *.* to testuser@127.0.0.1;
2) added --protocol=TCP parameter
3) Granted testuser select privileges to TEST database

None has fix the problem.

I would greatly appreciate anyone pointing out what I may have missed.

Thanks!!

Options: ReplyQuote


Subject
Written By
Posted
Non Root user Loging works from command line ERROR 1045 from heredoc
January 23, 2019 02:55PM


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.