| LFSトップ | Japanese Only | 2010/01/24 |
MySQL-5.1.42
はじめに
- BLFS ブック現時点にて 5.1.30 掲載。ここでは 5.1.42 ビルド。
参考サイト
- 最新ソースは、上記ホームページから以下のボタン、リンク等をたどってダウンロード。「Downloads」タブ、「MySQL Community Server」リンク、"Select Platform" にて「Source Code」選択、最終行「Generic Linux (Architecture Independent), Compressed TAR Archive」の「Download」ボタン、「» No thanks, just take me to the downloads!」リンク、国内ミラーイメージ(ボタン)
依存パッケージ
ビルド
ブートスクリプトインストール
- BLFS ブック内の手順どおり。手動起動はまだ行わない。下記の設定を行ってから。
make install-mysql
install -d -m 755 /etc/rc.d/rc{0,1,2,3,4,5,6,sysinit}.d
install -d -m 755 /etc/rc.d/init.d
install -d -m 755 /etc/sysconfig
install -m 754 blfs/init.d/mysql /etc/rc.d/init.d/
ln -sf ../init.d/mysql /etc/rc.d/rc0.d/K26mysql
ln -sf ../init.d/mysql /etc/rc.d/rc1.d/K26mysql
ln -sf ../init.d/mysql /etc/rc.d/rc2.d/K26mysql
ln -sf ../init.d/mysql /etc/rc.d/rc3.d/S34mysql
ln -sf ../init.d/mysql /etc/rc.d/rc4.d/S34mysql
ln -sf ../init.d/mysql /etc/rc.d/rc5.d/S34mysql
ln -sf ../init.d/mysql /etc/rc.d/rc6.d/K26mysql
設定
- エンコーディングを utf8 とするために「my.conf」ファイルを編集。
vi /etc/my.cnf
...
[mysqld]
...
default-character-set=utf8
...
[mysqldump]
...
default-character-set=utf8
...
[mysql]
...
default-character-set=utf8
...
/etc/rc.d/init.d/mysql start
Starting MySQL daemon... [ OK ]
確認
mysql -u root -p
Enter password: XXXXX
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.1.42-log Source distribution
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| test |
+--------------------+
3 rows in set (0.01 sec)
mysql> \q
Bye
ベース環境
cat /etc/lfs-release
SVN-20100109
|
|
| 松 山 道 夫 Michio Matsuyama |
|