Why is MySQL Access denied after .bashrc edit? I added this line
#mysql password
alias mysql='mysql -umilenko -p*myrealpass*** -hlocalhost'

Anyway,it does not work
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 1045 (28000): Access denied for user 'milenko'@'localhost' (using password: YES)

Also
mysql -u root -p
mysql: [Warning] Using a password on the command line interface can be insecure.
Enter password: 
ERROR 1698 (28000): Access denied for user 'root'@'localhost'

Version
mysql  Ver 8.0.23-0ubuntu0.20.04.1 for Linux on x86_64 ((Ubuntu))

I am not admin,I just need to use sql for my project.
How to solve this problem?
Never put your password into any script.
The accepted way to do this for MySQL is with a configuration file.

Use a separate configuration file to hold the password.
Protect that file so that you are the only one that can access it.
alias mysql to use that configuration file.

Something like this:
$ ls -ld ~/.milenko.cnf 
-rw------- 1 ... ~/.milenko.cnf 

$ cat ~/.milenko.cnf 
[mysql]
username=milenko
password=REALPASSWORD

In .bash_profile
alias mysql=&quot;/usr/lib/mysql --defaults-extra-file=~/.milenko.cnf --umilenko hlocalhost&quot;

Related answer.