Remote Access To MySQL Database Server on window

1. Navigate to MySQL Server bin folder by Command Prompt
2. Login MYSQL Server
mysql -u[username] -p[passoword]
Example: mysql -uroot -psdsl
3. Given grant remote access to MYSQL Server
Mysql> GRANT ALL PRIVILEGES ON *.* TO 'username'@'%' IDENTIFIED BY 'mysql_password'  WITH GRANT OPTION;
Example: mysql> GRANT ALL PRIVILEGES ON *.* TO root@'%' IDENTIFIED BY 'sdsl' WITH GRANT OPTION;
4. To execute FLUSH and reload privilege.
mysql> FLUSH PRIVILEGES;
5. Logout from MySQL Server
mysql> exit;
6. To Check remote enable
mysql -u[root] -p[password] -h[mysql_serverip]
Example: mysql -uroot -psdsl -h192.168.1.96

No comments:

Post a Comment