I have a problem with mysql command on Kali Linux OS. I'm using this command to connect to MySQL database on remote computer in local network (IP address: 172.16.64.81) but when i tried this command, it always force me to connect localhost and output the error:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
Clearly, i don't want to connect localhost and this is my command i used here:
mysql -u root -p -P 13306 -h 172.16.64.81
Please note that this is credential i'm using to login remote database. Username is 'root' and password is empty. I don't know why 'mysql' command enforces me to connect back to localhost? I don't use mysql database on my localhost. Flag:
-u | --user
-- username-p | --password
-- password-h | --host
-- Remote IP or Hostname-P | --port
-- optional Port number