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
'Data Science > DB+SQL' 카테고리의 다른 글
[MYSQL] Amazon Aurora – MySQL에서 DB 부하에 대한 최적화 방법 (0) | 2021.06.17 |
---|---|
[MYSQL] WSL Ubuntu MYSQL Install (0) | 2021.06.17 |
[MYSQL] Mysql Reference Site (0) | 2021.06.16 |
[MYSQL] GROUP_CONCAT 최대 길이 설정 (0) | 2021.06.15 |
[MYSQL] SELECT문에서 VALUES 사용하기 ( 가상 테이블가 유사 ) (0) | 2021.01.05 |
최근댓글