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이 cpu를 많이 점유하고, DB와의 연결상태가 좋지 않을때

    Date2016.07.05 ByJAESOO Views123
    Read More
  2. Mysql slow-query를 이용한 로그 분석

    Date2015.03.17 ByJAESOO Views143
    Read More
  3. Mysql 데몬 문제 해결 방안 (cpulimit)

    Date2015.03.17 ByJAESOO Views172
    Read More
  4. 리눅스 실시간으로 로그 보기 tail 명령어

    Date2015.03.16 ByJAESOO Views733
    Read More
  5. mysql 5.5.x my.cnf 참고

    Date2015.03.16 ByJAESOO Views487
    Read More
  6. Mysql Slow query log 등록

    Date2015.03.16 ByJAESOO Views545
    Read More
  7. MYSQL 성능 향상 정리

    Date2015.03.16 ByJAESOO Views158
    Read More
  8. MySQL Query Cache 사용법

    Date2015.03.16 ByJAESOO Views418
    Read More
  9. Mysql 에서 Got a packet bigger than 'max_allowed_packet' bytes 오류

    Date2014.12.25 ByJAESOO Views181
    Read More
  10. MySQL 내부 변수 max_allowed_packet

    Date2014.12.25 ByJAESOO Views308
    Read More
  11. Mysql binary log 정리, 삭제 주기 설정

    Date2014.11.17 ByJAESOO Views299
    Read More
  12. MySQL 로그 파일 관리 2 - 로그 파일 남기기

    Date2014.11.17 ByJAESOO Views529
    Read More
  13. MySQL 로그 파일 관리 1 - 설정

    Date2014.11.17 ByJAESOO Views416
    Read More
  14. MySQL Binary Log 지우는 방법

    Date2014.11.17 ByJAESOO Views232
    Read More
  15. MySQL 설치/사용시 발생 에러 유형별 대처방법

    Date2014.11.17 ByJAESOO Views4003
    Read More
  16. Mysql 데이터 폴더의 mysql-bin.xxx 파일들 관련 삭제 및 초기화 방법

    Date2014.11.17 ByJAESOO Views288
    Read More
  17. MySQL my.cnf 파일 수정으로 mysql 서버 튜닝하기

    Date2014.07.07 ByJAESOO Views1685
    Read More
  18. MySQL에 원격 접속 허용

    Date2014.07.07 ByJAESOO Views1256
    Read More
  19. mysql에서 (테이블명) is marked as crashed and should be repaired 에러시

    Date2014.01.23 ByJaeSoo Views1280
    Read More
  20. 왜 MySQL 에서 InnoDB 를 써야하는가? InnoDB vs MyISAM 비교

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

PageViews   Today : 9128 Yesterday : 5037 Total : 21965180  /  Counter Status   Today : 8826 Yesterday : 4602 Total : 1191549

Edited by JAESOO

sketchbook5, 스케치북5

sketchbook5, 스케치북5

나눔글꼴 설치 안내


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

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

설치 취소