Steps to make MySQL server connection remotely with Windows Command Prompt

kumkumsharma

Administrator
Staff member
You can follow below steps to remotely connect MySQL server.
  • Login to your server and hit Start + R button.
  • Now you have to go to the path C:\Program Files\MySQL\MySQL Server 5.X\bin and run below command:
Code:
mysql -u root -p
  • Now it will ask for MySQL root password, you have to enter the password.
  • You have to create remote user and assign root privileges to that user with below command:
Code:
MySQL Prompt
GRANT ALL PRIVILEGES ON *.* TO 'USERNAME'@'IP' IDENTIFIED BY 'PASSWORD';
Here you have to enter your Username, IP address and password.
  • At last you can enter below command to flush the assigned privileges.
Code:
FLUSH PRIVILEGES;
exit;
 
Top