インストール後の設定
http://extstrg.asabiya.net/pukiwiki/index.php?%A5%A4%A5%F3%A5%B9%A5%C8%A1%BC%A5%EB%B8%E5%A4%CE%C0%DF%C4%EAインストール後の設定 †
自動起動設定 †
MySQLのソースパッケージには起動・停止制御用のスクリプトが同梱されている。
下記手順にて所定位置にスクリプトをコピーすることで自動起動が可能である。(要root権限)
cd [MySQLソースパス] cd ./support-files chmod 755 mysql.server cp ./mysql.server /etc/init.d/mysql
MySQLをOSのサービスとして登録する
chkconfig mysql on
サービスの登録状況を確認する
chkconfig --list | grep mysql mysql 0:off 1:off 2:on 3:on 4:on 5:on 6:off
rootアカウントの設定 †
MySQLの管理者ユーザの設定をする
mysqladmin -u root password 'PASSWORD' mysqladmin -u root -h [HOST NAME] password 'PASSWORD'
接続を試験する
mysql -u root -p Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 3 to server version: 5.0.26 Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql>
環境変数 PATH設定 †
MySQL実行ファイルのパスを設定する。
アカウント個別に設定を行なう場合は~/.bash_profile、アカウント全てに設定を行なう場合は/etc/profileに下記を追記する。
export PATH=$PATH:/usr/local/mysql/bin export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/mysql/lib/mysql
Last-modified: 2008-08-27 (水) 12:40:40 (5720d)