FreeBSD 7.2下安裝MySQL 4.0

來源:互聯網
上載者:User

採用FreeBSD提供的ports安裝

第1步

# cd /usr/ports/databases/mysql40-server/

第2步

#make install

根據你的網路速度情況,可能要等10多分鐘

...

第3步:安裝資料庫

# /usr/local/bin/mysql_install_db     

第4步:

#chown -R mysql /var/db/mysql

第5步:啟動mysql
#/usr/local/bin/mysqld_safe &

第6步:設定root使用者密碼

#/usr/local/bin/mysqladmin -u root password '123456'

第7步:登入測試一下root使用者

#mysql -u root -p

第8步:設定mysql在系統啟動時自動啟動

#vi /etc/rc.conf

按a鍵在最後加上:

mysql_enable="YES"

例如我的設定檔:

# Created: Mon Apr 19 19:36:56 2010
# Enable network daemons for user convenience.
# Please make all changes to this file, not to /etc/defaults/rc.conf.
# This file now contains just the overrides from /etc/defaults/rc.conf.
defaultrouter="192.168.192.1"
hostname="Squid_CA.NIC"
ifconfig_le0="inet 192.168.192.33  netmask 255.255.255.0"
keymap="us.iso"
linux_enable="YES"
sshd_enable="YES"
mysql_enable="YES"

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.