- Use putty (for windows) or terminal (for unix/linux) and perform the ssh
ssh root@xxx.xxx.x.xx
Enter password:
(enter the server's password) - Then type:
mysql -u root -p
Enter password:
(enter the mysql password) - Then type the following command:
GRANT ALL PRIVILEGES ON *.* TO your_mysql_user@'%' IDENTIFIED BY 'your_mysql_password';
your_mysql_user
and your_mysql_password.
Now you can access the mysql server through remote connection.