Configuring your MySQL to access it from outside i.e. from any machine across intranet / internet is one of the basic needs of the developer.
The following sequence of steps are needed to achieve this.
We have to do the following changes,- Change bind address in MySQL configuration file my.cnf to 0.0.0.0 This allows mysql to bind to all interfaces. Previous value may be 127.0.0.1
- In mysql DB we have added new user root@% and granted all permissions to it.
- select host,user,password from mysql.user
- create user 'root'@'%' identified by 'pass';
- GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;
- GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION;
No comments:
Post a Comment