RadarURL

조회 수 22217 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄

*페도라코어4 서버
먼저 mysql.com에서 서버 rpm과 client rpm을 받는다 각각 여기서 받았다
http://dev.mysql.com/downloads/mysql/5.0.html#linux-static-x86-32bit-rpms

그리고나서

rpm -Uvh 으로 설치를 해준다

[root@localhost mysql]# ls -l
합계 25044
-rw-r--r--  1 root root  6527645  7월 25 17:15 MySQL-client-5.0.45-0.i386.rpm
-rw-r--r--  1 root root 19077102  7월 25 17:15 MySQL-server-5.0.45-0.i386.rpm
[root@localhost mysql]# rpm -Uvh MySQL-server-5.0.45-0.i386.rpm
[root@localhost mysql]# rpm -Uvh MySQL-client-5.0.45-0.i386.rpm

system-config-services 명령으로 mysql 서비스를 항상 가동되도록 체크되어잇는지 확인하고

"service mysql start"명령으로 mysql 데몬을 시작한다

외부에서 사용할수있도록 system-config-securitylevel 명령으로 mysql포트를 열어준다
mysql포트는 3306이므로 그외의 포트부분에서 "3306: tcp:"라고 써준다

처음에 mysql만 입력하면 접속이 되는데 바꿔줘야한다

mysqladmin -u root password '1234'
계정은 root이고 암호는 1234이다
그리고 mysql -u root -p 로 입력한후
패스워드 입력후 접속한다

윈도우즈 클라이언트 설치

http://dev.mysql.com/downloads/mysql/5.0.html#win32
여기가서
Windows Essentials (x86)
이놈을 다운받는다

그리고 인스톨시 서버설치는 하지않고(custom설치)
client프로그램에서 MySQL sever Instance Config역시 설치를 하지않고

대충 c:\mysql폴더에다 설치한다

윈도우에서 원격접속시
mysql -h <호스트또는 IP> -u <사용자이름>-p로 하면 되지만 원칙적으로 mysql서버에서는 외부에서 접근할
도메인을 등록해줘야한다

페도라 서버에가서 mysql에 접속뒤
use mysql;

root@localhost mysql]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 18
Server version: 5.0.45-community MySQL Community Edition (GPL)

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> use mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> select user,host from user
    -> ;
+------+-----------------------+
| user | host                  |
+------+-----------------------+
| root | 127.0.0.1             |
| root | 192.168.248.1         |
| root | 222.96.17.205         |
| root | localhost             |
| root | localhost.localdomain |
+------+-----------------------+
5 rows in set (0.00 sec)

위에 결과를 분석하자면 root에대해 로컬호스트외
192.168.248.1과 222.96.17.205 주소에대해 허용해주고 있다
추가해주는 쿼리문은
grant all privileges on *.* to 'root'@i'paddres'
identified by '비밀번호';
하면 등록이 될것이다

그럼 윈도우 커맨드 창에서 접속을 시도해보자
[root@localhost mysql]# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:0C:29:CC:74:72 
          inet addr:192.168.248.204  Bcast:192.168.248.255  Mask:255.255.255.0
페도라 서버의 ipaddress

C:\mysql\bin>mysql -h 192.168.248.204 -u root -p
Enter password: ********
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 19
Server version: 5.0.45-community MySQL Community Edition (GPL)

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>

원격 접속이 되는걸 확인할수있다
가령 mysql서버의 아이디와 패스워드 노출시 또는 강제적인 원격 접속이 가능하도록 변경된다면 위와같은
절차를 이용할것이다~


*grant는 사용자를 생성해주는 sql 구문이다 형식은 아래와 같다.
grant <사용권한> on <데이터베이스이름>.<테이블이름> to '<사용자이름>'@'<호스트이름>' IDENTIFIED BY '비밀번호';

사용_권한을 ALL PRIVILIEGES로 쓰면 모든 권한을 다 준다는 의미다. 권한의 일부만 주기위해서는 SELECT,INSERT,UPDATE,DELETE등을 별도로 줄수있다

<데이터베이스 이름>.<테이블 이름>을 *.*로 쓰면 모든 데이터베이스와 모든 테이블에 접근이 가능하다는 의미다.만약,mysql DB의 user 테이블만 사용할수 있도록 허락하려면 mysql.user라고 써 주면 된다.

 

출처 : http://hongten.egloos.com/464790

?

공부 게시판

공부에 도움되는 글을 올려주세요.

  1. [공지] 공부 게시판 입니다.

    Date2003.08.18 By처누 Views928102
    read more
  2. [오라클] RAC(Real Application Cluster)이란?

    Date2023.05.01 Category데이터베이스 ByJaeSoo Views95
    Read More
  3. 데이터베이스 튜닝 (DB Tuning)

    Date2023.04.27 Category데이터베이스 ByJaeSoo Views346
    Read More
  4. BCV (Business Continuance Volume)

    Date2023.04.14 Category데이터베이스 ByJaeSoo Views70
    Read More
  5. MySQL Dump / Import (덤프 / 임포트)

    Date2016.10.10 Category데이터베이스 ByJaeSoo Views229
    Read More
  6. mysql이 cpu를 많이 점유하고, DB와의 연결상태가 좋지 않을때

    Date2016.07.05 Category데이터베이스 ByJaeSoo Views338
    Read More
  7. [Oracle] Lock 확인 및 Lock 해제

    Date2016.03.28 Category데이터베이스 ByJaeSoo Views642
    Read More
  8. Mysql slow-query를 이용한 로그 분석

    Date2015.03.17 Category데이터베이스 ByJaeSoo Views697
    Read More
  9. Mysql 데몬 문제 해결 방안 (cpulimit)

    Date2015.03.17 Category데이터베이스 ByJaeSoo Views911
    Read More
  10. mysql 5.5.x my.cnf 참고

    Date2015.03.16 Category데이터베이스 ByJaeSoo Views673
    Read More
  11. Mysql Slow query log 등록

    Date2015.03.16 Category데이터베이스 ByJaeSoo Views785
    Read More
  12. MYSQL 성능 향상 정리

    Date2015.03.16 Category데이터베이스 ByJaeSoo Views627
    Read More
  13. MySQL Query Cache 사용법

    Date2015.03.16 Category데이터베이스 ByJaeSoo Views708
    Read More
  14. Mysql 에서 Got a packet bigger than 'max_allowed_packet' bytes 오류

    Date2014.12.25 Category데이터베이스 ByJaeSoo Views925
    Read More
  15. MySQL 내부 변수 max_allowed_packet

    Date2014.12.25 Category데이터베이스 ByJaeSoo Views585
    Read More
  16. Mysql binary log 정리, 삭제 주기 설정

    Date2014.11.17 Category데이터베이스 ByJaeSoo Views1158
    Read More
  17. MySQL 로그 파일 관리 2 - 로그 파일 남기기

    Date2014.11.17 Category데이터베이스 ByJaeSoo Views1238
    Read More
  18. MySQL 로그 파일 관리 1 - 설정

    Date2014.11.17 Category데이터베이스 ByJaeSoo Views1155
    Read More
  19. MySQL Binary Log 지우는 방법

    Date2014.11.17 Category데이터베이스 ByJaeSoo Views1222
    Read More
  20. MySQL 설치/사용시 발생 에러 유형별 대처방법

    Date2014.11.17 Category데이터베이스 ByJaeSoo Views6890
    Read More
  21. Mysql 데이터 폴더의 mysql-bin.xxx 파일들 관련 삭제 및 초기화 방법

    Date2014.11.17 Category데이터베이스 ByJaeSoo Views1115
    Read More
Board Pagination Prev 1 2 3 4 5 Next
/ 5


즐겨찾기 (가족)

JAESOO's HOMEPAGE


YOUNGAE's HOMEPAGE


장여은 홈페이지


장여희 홈페이지


장여원 홈페이지


즐겨찾기 (업무)

알리카페 홀릭

숭실대 컴퓨터 통신연구실 (서창진)

말레이시아 KL Sentral 한국인 GuestHouse


즐겨찾기 (취미)

어드민아이디

유에코 사랑회

아스가르드 좋은사람/나쁜사람

JServer.kr

제이서버 메타블로그

재수 티스토리


즐겨찾기 (강의, 커뮤니티)

재수 강의 홈페이지


한소리


VTMODE.COM


숭실대 인공지능학과


숭실대 통신연구실


베너