Go to your MySQL directory. As in my case its...
cd C:\Program Files\MySQL\MySQL Server 8.0\bin
mysql -uroot -p
root can be changed to your user whatever MySQL user you've set.
It will ask for your password. If you have a password, Type your password and press "Enter", If no password set just press Enter without typing. You will be connected to MySQL.
There is another way to directly connect to MySQL without every time, going to the directory and typing down the commands.
Create a .bat file.
First, add your path to MySQL. In my case it was,
cd C:\Program Files\MySQL\MySQL Server 8.0\bin
Then add these two lines
net start MySQL
mysql -u root -p
If you don't want to type password every time you can simply add password with -p e.g. -proot (in case root was the password) but that is not recommended.
Also, If you want to connect to other host than local (staging/production server). You can also add -h22.345.80.09 E.g. 22.345.80.09 is your server ip.
net start MySQL
mysql -u root -p -h22.345.80.0
Save the file. Just double click to open and connect directly to MySQL.