Loose-Info.com

Last Update 2019/12/24


TOP - 手順書集 - MySQL5.0(FreeBSD)

・ユーザーの設定
%su # adduser Username: mysql[Enter] Full name: mysql[Enter] Uid: [Enter] Login group: wheel[Enter] Login group is wheel. Invite mysql into other groups? []: [Enter] Login class: [Enter] Shell (sh csh tcsh nologin) [sh]: csh[Enter] Home directory [/home/mysql]: [Enter] Use password-based authentication? [yes]: [Enter] Use an empty password? (yes/no) [no]: [Enter] Use a random password? (yes/no) [no]: [Enter] Enter password: ******[Enter] Enter password again: ******[Enter] Lock out the account after creation? [no]: OK? (yes/no): yes adduser: INFO: Successfully added (mysql) to the user database. Add another user? (yes/no): no # pw groupadd -n mysql # reboot

・MySQLのインストール
% su # cd /usr/ports/databases/mysql50-server # make extract # make # make install # mkdir /var/db/mysql # /usr/local/bin/mysql_install_db # chown -R mysql /var/db/mysql # chgrp -R mysql /var/db/mysql # cp /usr/local/share/mysql/my-medium.cnf /etc/my.cnf # /usr/local/share/mysql/mysql.server start # cd /usr/local/etc/rc.d # vi mysql.sh #!/bin/sh if [ -x /usr/local/share/mysql/mysql.server ] ; then echo -n ' mysql' /usr/local/share/mysql/mysql.server start fi # chmod 0755 mysql.sh # reboot

・php5-mysqlのインストール
# su # cd /usr/ports/databases/php5-mysql # make extract # make # make install

・DBIのインストール
# cd /usr/ports/databases/p5-DBI # make extract # make # make install

・DBDのインストール
# cd /usr/ports/databases/p5-DBD-mysql # make extract # make # make install