Skip to content

2009.11.01 01:55

mysqli 동적모듈 추가

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

단축키

Prev이전 문서

Next다음 문서

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

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄 첨부
mysqli는 mysqli_connect시 mysql_connect 함수보다 속도면에서 뛰어나다고 한다. (현재조사한 자료까지는)

10건을 쿼리했을 경우 
기존방식처럼 mysql 를 사용했을 경우 0.002698 
mysqli를 사용했을 경우 0.001557 

1000건 쿼리했을 경우 
기존방식처럼 mysql 를 사용했을 경우 0.156648 
mysqli를 사용했을 경우 0.052507 

결론 : mysqli를 사용하는 것이 속도가 훨씬 빠릅니다.

mysqli를 php재컴파일없이 동적모듈로 추가

phpize를 이용하여 configure를 생성
cd php-x.x.x/ext/mysqli
/usr/local/php/bin/phpize
./configure -?with-php-config=/usr/local/php/bin/php-config -?with-mysqli=/usr/bin/mysql_config ( 각 경로는 현재 설치된 내용을 참조 한다)
또는
./configure -?with-php-config=/usr/local/php/bin/php-config -?with-mysqli=/usr/local/mysql/bin/mysql_config

완료 후 모듈을 설치한다. 설치는 파일을 옮겨주고 php.ini에 등록해주면 된다
mkdir /usr/local/php/modules
cp modules/mysqli.so /usr/local/php/modules
php.ini파일 수정
extension_dir = /usr/local/php/modules <-- 수정
extension=mysqli.so <--- 추가

php컴파일시 옵션추가
--with-mysqli=/usr/binmysql_config
또는
--with-mysqli=/usr/local/mysql/bin/mysql_config

mysqli.jpg

  1. MySQL 명령어 정리

    Date2010.03.08 Byl2zeo Views10332
    Read More
  2. MySQL 클러스터

    Date2009.11.19 ByADMINPLAY Views10049
    Read More
  3. mysqld: Sort aborted ( mysqld-nt : Sort aborted )

    Date2009.08.31 ByADMINPLAY Views10027
    Read More
  4. Mysql 5.0.67 Cluster 소스설치 구성하기

    Date2009.11.19 ByADMINPLAY Views10008
    Read More
  5. Mysql 버전확인

    Date2008.12.23 ByADMINPLAY Views9970
    Read More
  6. Mysql Replication(Master, Slave) 설정

    Date2009.11.19 ByADMINPLAY Views9837
    Read More
  7. MySQL max connection 값 변경

    Date2009.03.09 ByADMINPLAY Views9815
    Read More
  8. mysql 설치시 컴파일에러 ../depcomp: line 512 exec : g++ : not found

    Date2009.08.08 ByADMINPLAY Views9727
    Read More
  9. Mysql bin log 로테이션 방법

    Date2009.11.26 ByADMINPLAY Views9682
    Read More
  10. mysql5.0 계정 생성시 ssl_cipher 에러

    Date2009.03.03 ByADMINPLAY Views9668
    Read More
  11. mysqli 동적모듈 추가

    Date2009.11.01 ByADMINPLAY Views9508
    Read More
  12. mysqli 컴파일중 re2c 에러발생!

    Date2009.03.17 ByADMINPLAY Views9481
    Read More
  13. mysql 5.5.x my.cnf 참고

    Date2013.09.24 ByADMINPLAY Views9461
    Read More
  14. mysql data디렉토리 변경

    Date2008.10.30 ByADMINPLAY Views9392
    Read More
  15. skip-name-resolve

    Date2009.05.22 ByADMINPLAY Views9184
    Read More
  16. slow Query 조사

    Date2009.03.17 ByADMINPLAY Views9169
    Read More
  17. mysql 설치 옵션 해석

    Date2009.08.08 ByADMINPLAY Views8948
    Read More
  18. MySQL 특정 테이블만 백업하기

    Date2014.01.06 ByADMINPLAY Views8887
    Read More
  19. MySQL 스토리지 엔진 MyISAM과 InnoDB의 차이

    Date2009.06.25 ByADMINPLAY Views8870
    Read More
  20. mysql 외부접속

    Date2009.02.07 ByADMINPLAY Views8859
    Read More
Board Pagination Prev 1 2 3 4 5 Next
/ 5

Copyright ADMINPLAY corp. All rights reserved.

abcXYZ, 세종대왕,1234

abcXYZ, 세종대왕,1234