본문 바로가기
정보기술/일반

MySQL 4.0 - > 5.0 업그레이드시 고려할 사항

by fermi 2006. 4. 19.

구버전 mysql 4.0 에서 dump

.\mysql\bin>mysqldump --opt -u root --password="암호" --default-character-set=euc_kr DB이름 > blog.sql

신버전 mysql 5.0 에서 restore

.\MySQL\MySQL Server 5.0\bin>mysql -u root --password="암호" --default-character-set=euckr DB이름 < blog.sql




mysql 4.0 언인스톨 하기 전에

net stop mysql

mysqld --remove


mysql 5.0 설치시

MySQL server instance configuration 에서 utf8로 설치


암호문제

password() -> old_password()

한글문제

if (!$this->con) $this->db_error("DB연결오류");
else @mysql_query("SET NAMES euckr");
if (!@mysql_select_db($this->db, $this->con)) $this->db_error("DB선택오류");

utf8 문제??


http://www.phpschool.com/gnuboard4/bbs/board.php?bo_table=tipntech&wr_id=43681&sca=&sfl=wr_subject%7C%7Cwr_content&stx=%C7%D1%B1%DB&sop=and&page=2

http://www.phpschool.com/gnuboard4/bbs/board.php?bo_table=tipntech&wr_id=42884&sca=&sfl=wr_subject%7C%7Cwr_content&stx=%C7%D1%B1%DB&sop=and&page=2

http://www.phpschool.com/gnuboard4/bbs/board.php?bo_table=tipntech&wr_id=38352&sca=&sfl=wr_subject%7C%7Cwr_content&stx=set+names&sop=and

http://www.phpschool.com/gnuboard4/bbs/board.php?bo_table=tipntech&wr_id=42439&sca=&sfl=wr_subject%7C%7Cwr_content&stx=%C7%D1%B1%DB&sop=and&page=3



password & utf8 문제

http://www.phpschool.com/gnuboard4/bbs/board.php?bo_table=qna_db&wr_id=83398&sca=&sfl=wr_subject%7C%7Cwr_content&stx=old_password&sop=and




-----------------------------------------

mysql_connect 함수 수정 중

function euckr_mysql_connect($server, $username, $password, $new_link, $client_flag){
        
        $connect = @mysql_connect($server, $username, $password, $new_link, $client_flag);
        if($connect) mysql_query("SET NAMES euckr");

        return $connect;
}


이렇게 함수를 만든 후에

replace all

mysql_connect -> euckr_mysql_connect

--------------------------------------------

password 는 php 함수가 아닌 mysql query 이므로 replace all

password( -> old_password(

--------------------------------------------

http://dev.mysql.com/doc/refman/4.1/en/windows-start-service.html

Install the server as a service using this command:

C:\> C:\mysql\bin\mysqld --install

To remove a server that is installed as a service, first stop it if it is running by executing NET STOP MySQL. Then use the --remove option to

remove it:

C:\> C:\mysql\bin\mysqld --remove