MySQL-5.1.46の導入

# cd /usr/local/src
# tar -zxvf mysql-5.1.46.tar.gz
# cd /mysql-5.1.46
# ./configure --with-charset=ujis \
  --with-charset=utf8 \
  --with-extra-charsets=all \
  --with-mysqld-user=mysql \
  --with-innodb \
  --with-plugins=innobase,partition \
  --enable-local-infile \
  --prefix=/usr/local/mysql \
  --with-unix-socket-path=/tmp/mysql.sock
# make


../depcomp: line 571: exec: g++: not found

make時に上記エラーが出たら、g++をインストールする。

# apt-get install g++

makeが成功したら、インストール

# make install

データベースの初期化

# /usr/local/mysql/bin/mysql_install_db
Installing MySQL system tables...
OK
Filling help tables...
OK

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:

/usr/local/mysql/bin/mysqladmin -u root password 'new-password'
/usr/local/mysql/bin/mysqladmin -u root -h www.yoursite.net password 'new-password'

Alternatively you can run:
/usr/local/mysql/bin/mysql_secure_installation

which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.

See the manual for more instructions.

You can start the MySQL daemon with:
cd /usr/local/mysql ; /usr/local/mysql/bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl
cd /usr/local/mysql/mysql-test ; perl mysql-test-run.pl

Please report any problems with the /usr/local/mysql/bin/mysqlbug script!

権限の設定

# chown -R root:root /usr/local/mysql
my.cnf のコピー
# cp -p /usr/local/src/mysql-5.1.46/support-files/my-medium.cnf /usr/local/mysql/var/my.cnf

my.cnfに下記1行を追加

user=root

MySQLの起動

# /usr/local/mysql/share/mysql/mysql.server start

PATHの設定
.bashrcか.bash_profile(Debianは.profile)に以下を追加

PATH="$PATH":/usr/local/mysql/bin

追加後、下記を実行(.bash_profile、.profileの場合は.bashrcを置き換えて)

# source ~/.bashrc

トップ   編集 凍結解除 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2011-05-25 (水) 21:13:26 (3065d)