0

I am using mysql 5.6 I want to connect mysql from bash.

mysql -u root -pAdmin@1234

i am getting following error-

Warning: Using a password on the command line interface can be insecure.

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

But if i used -

mysql -u root -p

and provide password manually then it works. Can any one help me out this issue.

  • [please refer this link to how to create user with **localhost** or **ip** based user](https://stackoverflow.com/questions/10299148/mysql-error-1045-28000-access-denied-for-user-billlocalhost-using-passw) And grant all privileges to that user. – Prakash Jethava Mar 21 '18 at 07:15

1 Answers1

0

I think your password is not exactly "Admin@123". If there are any special characters, use the escape character " \ " in the command line and try it.

  • thanks for help. due to special characters in the password field, mysql is not allowed on bash. once i changed the password without special character i got login through bash. – Parag Deshmukh Mar 21 '18 at 11:20