Ubuntu16.04 LTS에서 MySQL 데이터베이스를 설치하고 루트 사용자가 원격 연결을 허용하도록 설정
1660 단어 백엔드
명령은 한 줄만 필요합니다:
apt-get install mysql-server
설치 과정에서 루트 사용자의 비밀번호를 설정해야 합니다.2. 루트 사용자가 바인딩한 연결 주소 변경
mysql -u root -p
, 방금 설정한 비밀번호를 입력하고 데이터베이스에 로그인mysql> grant all privileges on *.* to 'root'@'%' identified by '* *' with grant option;
mysql>flush privileges;
MySQL 최신 버전과 원격 IP 주소 연결에 대한 설정 파일이
/etc/mysql/mysql.conf.d/mysqld.cnf
로 변경되었으므로 명령을 입력하십시오: sudo vi /etc/mysql/mysql.conf.d/mysqld.cnf
, 이 부분을 찾으십시오:# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address = 127.0.0.1
#
# * Fine Tuning
다음 행에 주석을 둡니다.
bind-address = 127.0.0.1
:# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
#bind-address = 127.0.0.1
#
#* Fine Tuning
4. MySQL:
sudo service mysql restart
재부팅
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
[Spring Framework] 10강 - RESTful API그런데 RESTful API를 쓴 경우는 URL에 행위가 안써져 있고 단순히 특정 데이터 명시가 필요할 경우만 데이터를 명시하고 끝이 납니다. 특정 언어에 종속되지 않으며, 대부분의 프로그래밍 언어에서 JSON 포맷...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.