728x90

 

1) local 에서 mysql 실행. 
etc/mysql/mysql -u root 

2) Grant privileges. As root user execute with this substituting 'password' with your current root password :

RENAME USER 'root'@'localhost' TO 'root'@'%';
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'password';

GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'password';

FLUSH PRIVILEGES;

SELECT User, Host, plugin, authentication_string FROM mysql.user;



3) bind to all addresses:
The easiest way is to comment out the line in your my.cnf file:

#bind-address = 127.0.0.1 


4) restart mysql

service mysql restart

# or 

/etc/init.d/mysql stop
/etc/init.d/mysql start



By default it binds only to localhost, but if you comment the line it binds to all interfaces it finds. Commenting out the line is equivalent to bind-address=*.
To check where mysql service has binded execute as root:

netstat -tupan | grep mysql

 

728x90
  • 네이버 블러그 공유하기
  • 네이버 밴드에 공유하기
  • 페이스북 공유하기
  • 카카오스토리 공유하기
반응형