MySQL 5.0 の設定

MySQL の権限テーブルを作成します。
この作業は mysql_install_db コマンドを使って行います。
また MySQL の設定ファイルを作成して MySQL のデータディレクトリの所有者を設定します。

MySQL 権限テーブルの生成

mysql_install_db スクリプトは MySQL の全ての権限を管理する mysql データーベースと MySQL のテストに使用できるデーターベースを作成します。
この作業は MySQL をインストールした後に一度だけ行います。

# /usr/local/mysql/bin/mysql_install_db --user=mysql
Installing all prepared tables
Fill help tables

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-5.0.27/bin/mysqladmin -u root password ‘new-password’
/usr/local/mysql-5.0.27/bin/mysqladmin -u root -h server.honana.com password ‘new-password’
See the manual for more instructions.

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

You can test the MySQL daemon with the benchmarks in the ’sql-bench’ directory:
cd sql-bench ; perl run-all-tests

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

The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at http://shop.mysql.com

MySQL の設定

MySQL の設定ファイルの雛形がインストールディレクトリ(share/mysql)に存在します。
このファイルをデータディレクトリ(/usr/local/mysql/var)にコピーして MySQL の設定ファイルを作成します。

# cp /usr/local/mysql/share/mysql/my-medium.cnf /usr/local/mysql/var/my.cnf

ディレクトリの所有者の変更

MySQL のバイナリの所有者を root に変更し、データディレクトリの所有者を MySQL 実行ユーザーに変更します。

# chown -R root /usr/local/mysql-5.0.27
# chown -R mysql /usr/local/mysql-5.0.27/var
# chgrp -R mysql /usr/local/mysql-5.0.27
カテゴリー
  • Fedora のインストール (24)
  • OpenSSH で SSH サーバー構築 (4)
  • NTP で時刻情報サーバー構築 (4)
  • Apache HTTP Server で Web サーバー構築 (32)
  • MySQL でデーターベースサーバー構築 (10)
  • PostgreSQL でデーターベースサーバー構築 (22)
  • PHP で Web アプリケーションサーバー構築 (4)
  • qmail でメールサーバー構築 (7)
  • Tomcat で Web アプリケーションサーバー構築 (3)
  • Samba でファイルサーバー構築 (3)
  • BIND でネームサーバー構築 (3)
  • ProFTPD で FTP サーバー構築 (5)
  • snort でネットワーク進入探知システム構築 (3)
  • CMS でサイト構築 (3)
  • ネットワーク設定 (3)
  • システム設定 (4)
  • ライブラリのインストール (8)
  • Debian GNU/Linux (26)
  • Ubuntu (17)
  • メモ (6)
  • このサイトについて (4)
  • 相互リンク (6)