17:mysqlのインストール

Date 2012-9-10 23:11:02 | Topic: CentOS 6.3(6.4)に挑戦

mysqlサーバーをインストールします。
# yum -y install mysql-server
mysqlの設定をしますが ( /etc/my.cnf )、私の場合はWEBサーバーのデーターをmysqlにしまってありますが、その移行をスムーズにする為に、デフォルトとは違うdatadirを指定します
[mysqld]
 	datadir=/webdata/mysql ← 右辺を変更
 	socket=/var/lib/mysql/mysql.sock
 	user=mysql
# Disabling symbolic-links is recommended to prevent assorted security risks
 	symbolic-links=0

[mysqld_safe]
 	log-error=/var/log/mysqld.log
 	pid-file=/var/run/mysqld/mysqld.pid

サーバーを起動し、再起動後も有効に
# service mysqld start
# chkconfig mysqld on
私の場合はmysqlのデーターを、現在アクティブなWEBからコピーしたので、パスワードの設定等は既に入っていますが、デフォルトではその設定が必要です。
http://centossrv.com/mysql.shtmlを参考に進めて下さい。
あと、XOOPSで必要になるphp-mysqlもインストールする。
# yum install php-mysql


This article comes from 錦稜会 KINRYOKAI
https://www.kinryokai.net

The URL for this story is:
https://www.kinryokai.net/article.php?storyid=152