資料庫
作者:tseng 日期:2009-05-19
一、mysql
cd /usr/ports/databases/mysql50-server
make WITH_CHARSET=big5 WITH_XCHARSET=all install clean
cd /usr/ports/databases/php5-mysql
make install clean
vi /etc/rc.conf
mysql_enable="yes"
/usr/local/etc/rc.d/mysql-server start
設定sql
/usr/local/bin/mysql mysql
Update user SET password=password('XXXXXXXXXX') where user='root';
FLUSH PRIVILEGES;
二、PostgreSQL
cd /usr/ports/databases/postgresql82-server
make install clean
cd /usr/ports/databases/php5-pgsql
make install clean
vi /etc/rc.conf
postgresql_enable="YES"
/usr/local/etc/rc.d/postgresql initdb
vi ~pgsql/data/postgresql.conf
listen_addresses = '*'-------希望其他使用者可以經由其他機器連線
vi ~pgsql/data/pg_hba.conf
host all all 192.168.0.1 255.255.255.0 md5-------最後一行表示網域192.168.0.1~192.168.0.255 的連線都要使用 md5 驗証密碼
/usr/local/etc/rc.d/postgresql start
設定
su -l pgsql
createuser root
cd /usr/ports/databases/mysql50-server
make WITH_CHARSET=big5 WITH_XCHARSET=all install clean
cd /usr/ports/databases/php5-mysql
make install clean
vi /etc/rc.conf
mysql_enable="yes"
/usr/local/etc/rc.d/mysql-server start
設定sql
/usr/local/bin/mysql mysql
Update user SET password=password('XXXXXXXXXX') where user='root';
FLUSH PRIVILEGES;
二、PostgreSQL
cd /usr/ports/databases/postgresql82-server
make install clean
cd /usr/ports/databases/php5-pgsql
make install clean
vi /etc/rc.conf
postgresql_enable="YES"
/usr/local/etc/rc.d/postgresql initdb
vi ~pgsql/data/postgresql.conf
listen_addresses = '*'-------希望其他使用者可以經由其他機器連線
vi ~pgsql/data/pg_hba.conf
host all all 192.168.0.1 255.255.255.0 md5-------最後一行表示網域192.168.0.1~192.168.0.255 的連線都要使用 md5 驗証密碼
/usr/local/etc/rc.d/postgresql start
設定
su -l pgsql
createuser root
评论: 0 | 引用: 0 | 查看次数: 3452
发表评论