MySQL4.0ç³»âMySQL5.0ç³»
- 2007.04.18
- ã¤ã³ãã©, åå¼·ä¼è³æ
MySQLã®ãã¼ã¸ã§ã³ã¢ãã
- MySQL 4.0 ã¾ã§ã¯ã3.X ãã 4.0 ã« upgrade ãã¦ãããªãã®å½±é¿ããªããã®ã¾ã¾å¤ããã¼ã¿(/var/lib/mysql)ã使ãã¾ããã
- ãã³ãâãªã¹ãã¢ä¸è¦ããALTER TABLEããä¸è¦ã
- 4.1 以ä¸ã«upgradeããã¨ãã¯ãæ¥æ¬èªãã£ã©ã¯ã¿ã¼ã»ããã使ã£ã¦ããå ´åã注æããªãã¦ã¯ãªããªãç¹ãè¤æ°åå¨ãã¾ãã
4.0â5.0
追å æ©è½
è©³ç´°ï¼ http://lists.mysql.com/mysql-ja/262
ããã http://www.klab.org/media/mysql/
- ã¹ãã¢ãããã·ã¼ã¸ã£ãã¹ãã¢ããã¡ã³ã¯ã·ã§ã³ãå®è£
- ããªã¬ã¼ãå®è£
- ãã¥ã¼ãå®è£
- ãµã¼ããµã¤ãã«ã¼ã½ã«æ©è½ãå®è£
- æ
å ±ã¹ãã¼ããå®è£
- XA åæ£ã»ãã©ã³ã¶ã¯ã·ã§ã³ã®å®è£
- HEAP(MEMORY) ãã¼ãã«ã®ã¤ã³ããã¯ã¹ã«ãBTREE ã追å
- ãµãã¯ã¨ãª ã®è¿½å
- NDB ã¯ã©ã¹ã¿ã¼ã®è¿½å
- GIS追å
- utf8 , ucs2 ãã£ã©ã¯ã¿ã¼ã»ããã®è¿½å
- æ¥æ¬èªãã£ã©ã¯ã¿ã»ãã cp932 / eucjpms ã«å¯¾å¿
- æåã³ã¼ãã®èªåå¤ææ©è½ã追å
- ãã¼ã¿ãã¼ã¹ããã¼ãã«ããã£ã¼ã«ããããããåå¥ã«ãã£ã©ã¯ã¿ã¼ã»ãããæå®ã§ããããã«ãªã£ãã
ããããï¼ï¼ï¼ï¼ï¼
å¤æ´ç¹
è©³ç´°ï¼ http://www.mysql.gr.jp/frame/modules/bwiki/index.php?FAQ#content_1_40
- ãã¹ã¯ã¼ãã®ä¿åå½¢å¼ãå¤ãã£ãã(é·ããªã£ã)
ï½4.0 12de31820cbc0fce
4.1ï½ *59170D1E4A5E56267B6ED9C51ED62619FB817E6B
CHAR(10) 㯠10 ãã¤ããã 10 æåã«å¤ãã£ãã
- 3.X, 4.0 㧠char(10) ã¨å®ç¾©ãã¦ãããã£ã¼ã«ããã 4.1 ã« uprade ããç¬éã«ãchar(3) ããã㯠char(5) æ±ãã«ãªã£ã¦ãã¾ãã¾ãã
- ujis ã¯ãæ大㧠3ãã¤ãã使ç¨ã㦠1æåã表ç¾ãããsjis ã¯æ大㧠2ãã¤ãã使ç¨ã㦠sjis 1æåã表ç¾ããã
- 4.0 㧠CHAR(10) ã¨å®ç¾©ããããã㯠10 ãã¤ãã
- 4.1 ã« upgrade ãããã10ãã¤ãããXæåã«ããªããã°ãªããªãã
- ããã§ãujis ã®å ´åã¯ã10ãã¤ã -> 3(ujis)æåã¨ãªãã
char(10) ã char(3) ã«ãªãããªãã¯
4.0 ã¾ã§ : ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼10
å
é¨ãã¤ã: â â â â â â â â â â
4.1(ujis) : ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼
æåæ° ãï¼ããï¼ããï¼
4.1(sjis) : ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼
æåæ° ã ï¼ãï¼ãï¼ãï¼ãï¼
- char() ã«ãå
¨ã¦ã®ãã¤ãåãå
¥ããªããªã£ãã
- ujis ã®ãã£ã¼ã«ãã«ã¯ãEUC-JP ã«å®ç¾©ãããã³ã¼ã空éã®ãã¤ããã INSERT ã§ããªãã
- ãã¼ã¿ãã¼ã¹åããã¼ãã«åã¯ãOS ä¸ã§ã¯ unicode ã«ç´ããã¦ä¿åãããããã«å¤ãã£ã(ãã£ã¬ã¯ããªåããã¡ã¤ã«åããutf8 ãã£ã©ã¯ã¿ã¼ã»ããã§æ¸ãããããã«ãªã£ã)ã
- 4.0 ã¾ã§ã¯ãã¤ããªåããã®ã¾ã¾ãã¼ã¿ãã¼ã¹å(=ãã£ã¬ã¯ããªå)ããã¼ãã«å(=ãã¡ã¤ã«å)ã«ãªã£ã¦ããã
- mysqldump ã®æ¨æºãã£ã©ã¯ã¿ã¼ã»ãããã©ãã³ã³ãã¤ã«ãã¦ã utf8 ã«ãªã
- timestamp åã®è¡¨ç¤ºãã©ã¼ããããå¤ãã£ãã
ï½4.0 20050116214504
4.1ï½ 2005-01-16 21:45:50
- mysqlãã¼ã¿ãã¼ã¹ã®ãã¼ãã«ãå¤ãã£ã
ããããï¼ï¼ï¼ï¼ï¼
ã¢ããã°ã¬ã¼ãæã®åé¡ã¨å¯¾å¿
è©³ç´°ï¼ http://www.mysql.gr.jp/frame/modules/bwiki/?Contrib
ããã http://www.mysql.gr.jp/frame/modules/bwiki/index.php?FAQ#content_1_46
- ãã¹ã¯ã¼ãã®ä¿åå½¢å¼ãå¤ãã£ã
mysqldèµ·åãªãã·ã§ã³ã§è§£æ±ºï¼old-password
- æåã³ã¼ãã®èªåå¤ææ©è½
- char() ã«ãå ¨ã¦ã®ãã¤ãåãå ¥ããªããªã£ãã
- mysqldump ã®æ¨æºãã£ã©ã¯ã¿ã¼ã»ãããã©ãã³ã³ãã¤ã«ãã¦ã utf8 ã«ãªã
- ãããã§è§£æ±ºï¼ http://www.mysql.gr.jp/frame/modules/bwiki/index.php?plugin=attach&refer=Contrib&openfile=mysql-5.0.33-jp-all.patch2
- CHAR(10) 㯠10 ãã¤ããã 10 æåã«å¤ãã£ãã
ã·ã§ã«ãããã§è§£æ±ºï¼ http://www.mysql.gr.jp/frame/modules/bwiki/index.php?plugin=attach&refer=Contrib&openfile=mysql_change_char_len.sh
- timestamp åã®è¡¨ç¤ºãã©ã¼ããããå¤ãã£ãã
- ã¢ããªã®ä½ãæ¹ã«æ³¨æã
- ãã¼ã¿ãã¼ã¹åããã¼ãã«åã¯ãOS ä¸ã§ã¯ unicode ã«ç´ããã¦ä¿åãããããã«å¤ãã£ã(ãã£ã¬ã¯ããªåããã¡ã¤ã«åããutf8 ãã£ã©ã¯ã¿ã¼ã»ããã§æ¸ãããããã«ãªã£ã)ã
- mysqlãã¼ã¿ãã¼ã¹ã®ãã¼ãã«ãå¤ãã£ã
- å¤æã³ãã³ãã§è§£æ±ºï¼mysql_fix_privilege_tables
ã¢ãããã¼ãæºå
ã³ã³ãã¤ã«
- åé¡è§£æ±ºãããé©ç¨
http://www.mysql.gr.jp/frame/modules/bwiki/index.php?plugin=attach&refer=Contrib&openfile=mysql-5.0.33-jp-all.patch2
- configureææ¨æºãªãã·ã§ã³ã«ä¸è¨ãªãã·ã§ã³ã追å
--with-charset=binary
å¿ é ä½æ¥
my.cnfã®è¨å®
- æ§å½¢å¼ã®ãã¹ã¯ã¼ããå©ç¨ãã
[mysqld-5.0]
old-passwords
- ã¯ã©ã¤ã¢ã³ãããµã¼ãéçã®æåã³ã¼ããçµ±ä¸ãèªåå¤æãããªã
[client]
default-character-set=ujis
[mysqld]
skip-character-set-client-handshake
default-character-set=ujis
default-collation=ujis_japanese_ci
[mysqldump]
default-character-set=ujis
hex-blob
[mysql]
default-character-set=ujis
ã¢ããã°ã¬ã¼ãæ¹æ³
MySQLã¢ãããã¼ãã®ã¿
/var/lib/mysqlãã£ã¬ã¯ããªã®ãã¼ã¿ã5.0ç¨ã«å¤æãã¦å©ç¨ãã
- mysqlãã¼ãã«ã4.0ä»æ§ãªã®ã§ç¡è¦ãã¦èµ·å
/etc/init.d/mysql start --skip-grant-tables
- mysqlãã¼ãã«4.0â5.0å¤æå¦ç
mysql_fix_privilege_tables
- æ¢åcharé ç®å¤æå¦çã·ã§ã«ããã
http://www.mysql.gr.jp/frame/modules/bwiki/index.php?plugin=attach&refer=Contrib&openfile=mysql_change_char_len.sh
MySQLã¢ãããã¼ãï¼ããã¯ã¢ãããã¼ã¿ã¤ã³ãã¼ãï¼æ§é ãã¨ï¼
mysqldumpã§4.0ãã¼ã¿ãæ§é ãã¨ã¨ã¯ã¹ãã¼ãã5.0ä¸ã«ã¤ã³ãã¼ããåæ§ç¯
- ããã¯ã¢ãããã¼ã¿ã¤ã³ãã¼ãï¼æ§é ãã¨ï¼
- 権éæ
å ±ã®è¨å®ãå¿
è¦
- mysqlãã¼ãã«ã®ãã¼ã¿ã®ã¿ã¤ã³ãã¼ã
ã¢ããã°ã¬ã¼ãå®æ½çµæ
MySQLã¢ãããã¼ãã®ã¿
â»å¾®å¦ã«æ¡æ°ãå¤ãã£ã¦ãã¾ãï¼
ã4.0â5.0ããããããããï¼varchar(100)âvarchar(33)
ãmysql_change_char_len.shï¼varchar(33)âvarchar(101)
MySQLã¢ãããã¼ãï¼ããã¯ã¢ãããã¼ã¿ã¤ã³ãã¼ãï¼æ§é ãã¨ï¼
â»ãã¼ã¿ãå¤ãå ´åæéããããï¼
ãã¯ã©ã¤ã¢ã³ã(mysqlclient)ãå¤æ´ãå¿ è¦ï¼ï¼ï¼
åèè³æ
- http://lists.mysql.com/mysql-ja/262
- http://www.mysql.gr.jp/frame/modules/bwiki/index.php?FAQ#content_1_40
- http://www.klab.org/media/mysql/
ããããï¼ï¼ï¼ï¼ï¼