kamei.org

kamei.orgの裏側

  • Home
  • 紹介

MySQL - InnoDBテーブルのオプティマイズ

Author: kamei

MySQLのテーブル名一覧取ってくる方法知らんのでファイル名から抽出(ぉ

for file in PATH_TO_DATABASE/*.MYD
do
filename=`basename ${file}`
echo “optimize table ${filename%.MYD};” | mysql -u USERNAME -D DBNAME –password=PASSWORD
done

*.MYDファイルのサイズが軒並み小さくなった。

9 月 10th, 2008  |  Posted in memo  |  No Comments »

MySQL

Author: kamei

$ CC=gcc CXX=gcc ./configure –prefix=/usr/local/mysql \

–with-charset=utf8 \

–with-extra-charsets=all \

–with-mysqld-user=mysql \

–with-readline 2>&1 | tee configure.log

$ make
# make install
# cp support-files/my-medium.cnf /etc/my.cnf
# cp support-files/mysql.server /etc/init.d/mysql
# chmod 755 /etc/init.d/mysql
# mkdir /var/mysql
# chown mysql:mysql /var/mysql/
# cd /usr/local/mysql
# ln -s /var/mysql var
# /usr/local/mysql/bin/mysql_install_db –user=mysql
# /usr/local/mysql/bin/mysqld_safe –user=mysql &
# /usr/local/mysql/bin/mysql -u root
mysql> set password for root@localhost=PASSWORD(’h0gem0ge’);

/etc/my.cnf 編集・以下を追加

[mysqld]
skip-networking
innodb_file_per_table
skip-character-set-client-handshake
default-character-set = utf8
character-set-server = utf8
collation-server = utf8_general_ci
init-connect = SET NAMES utf8

[client]
default-character-set = utf8

[mysqldump]
default-character-set = utf8

[mysql]
default-character-set = utf8

TCPソケット通信しない。文字コードはとにかく UTF-8。

実際の作業では場合によって上記手順は多少入替える必要があり。

9 月 9th, 2008  |  Posted in memo  |  No Comments »

てすてす

Author: kamei

Youtubeテスト

9 月 3rd, 2008  |  Posted in 未分類  |  No Comments »

wordpress

Author: admin

動かしてみた。それだけ。

9 月 3rd, 2008  |  Posted in 未分類  |  No Comments »

  • Categories

    • memo (2)
    • 未分類 (2)
  • 2009 年 1 月
    日 月 火 水 木 金 土
    « 9 月    
     123
    45678910
    11121314151617
    18192021222324
    25262728293031
  • Archives

    • 2008 年 9 月
  • ブログロール

    • Development Blog
    • Documentation
    • Plugins
    • Suggest Ideas
    • Support Forum
    • Themes
    • WordPress Planet
  • Meta

    • ログイン
    • Valid XHTML
    • XFN
    • WordPress

Copyright © 2009 - kamei.org | Entries (RSS) | Comments (RSS)

WordPress theme designed by web design