RadarURL
Skip to content
조회 수 12686 추천 수 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:mysqlbin>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. mySQL에서 사용자와 권한

    Date2004.04.16 By처누 Views7326
    Read More
  2. Mysql 기초-DB 설치, 관리자지정, 계정추가 등

    Date2004.06.06 By처누 Views7355
    Read More
  3. MySql 테이블 검사 및 복구하기 [ myisamchk ]

    Date2005.11.26 ByJaeSoo Views6892
    Read More
  4. mysql에서 사용자 계정 비밀번호 변경 방법

    Date2006.02.16 ByJaeSoo Views7859
    Read More
  5. MySQL에서 테이블을 생성할때 MyISAM과 InnoDB 어느것을 선택하나요?

    Date2010.01.25 ByJaeSoo Views7581
    Read More
  6. [Mysql] 범위 삭제 DELETE 쿼리

    Date2010.05.05 ByJaeSoo Views8115
    Read More
  7. mysql 4.x 버전의 euc-kr(latin1) DB를 mysql 5.x 버전으로 이전 하는법

    Date2011.04.30 ByJaeSoo Views8529
    Read More
  8. MySQL Dump뜨는 방법 및 복구 방법

    Date2011.06.08 ByJaeSoo Views10702
    Read More
  9. fedora core4 mysql 서버설치 및 windows client로 접속

    Date2011.06.16 ByJaeSoo Views12686
    Read More
  10. [Fedora 8] Mysql 5.0.67 설치

    Date2011.06.16 ByJaeSoo Views10362
    Read More
  11. Mysql DB 손상됬을경우 점검 및 복구 명령

    Date2011.09.16 ByJaeSoo Views9270
    Read More
  12. MySQL 재설치시 오류

    Date2011.11.15 ByJaeSoo Views7600
    Read More
  13. MySQL Data file 위치

    Date2011.11.15 ByJaeSoo Views5561
    Read More
  14. MySQL Plugin 'InnoDB' init function returned error.

    Date2011.11.15 ByJaeSoo Views5745
    Read More
  15. mysqlcheck 유틸리티 사용법(analyze, optimize, repair)

    Date2012.06.05 ByJaeSoo Views4627
    Read More
  16. 윈도우환경에서 MySQL 설치하기

    Date2013.03.13 ByJaeSoo Views3534
    Read More
  17. MySQL database 정보 import하기

    Date2013.03.13 ByJaeSoo Views1355
    Read More
  18. MySQL 테이블 형태 변경하기 MyISAM -> InnoDB(또는 InnoDB -> MyISAM)

    Date2013.03.19 ByJaeSoo Views1617
    Read More
  19. [MySQL] phpMyAdmin으로 MyISAM 테이블 형식을 InnoDB로 바꾸기

    Date2013.03.19 ByJaeSoo Views6768
    Read More
  20. 왜 MySQL 에서 InnoDB 를 써야하는가? InnoDB vs MyISAM 비교

    Date2013.04.12 ByJaeSoo Views3935
    Read More
Board Pagination Prev 1 2 Next
/ 2

PageViews   Today : 9116 Yesterday : 5037 Total : 21965168  /  Counter Status   Today : 8814 Yesterday : 4602 Total : 1191537

Edited by JAESOO

sketchbook5, 스케치북5

sketchbook5, 스케치북5

나눔글꼴 설치 안내


이 PC에는 나눔글꼴이 설치되어 있지 않습니다.

이 사이트를 나눔글꼴로 보기 위해서는
나눔글꼴을 설치해야 합니다.

설치 취소