2007年4月29日星期日

FreeBSD RELEASE 6.2安装mysql 4.1.22

cd /usr/ports/databases/mysql41-server/
make install clean
/usr/local/bin/mysql_install_db
chown -R mysql /var/db/mysql/
chgrp -R mysql /var/db/mysql/
/usr/local/bin/mysqld_safe -user=mysql &
/usr/local/bin/mysqladmin -u root password newpassword

vi /etc/rc.conf
mysql_enable="YES" (在rc.conf文件里加入这行代码)

试试看
mysql -u root -p
Enter password:
mysql> use test;
mysql> select database();
mysql> show tables;
mysql> select database();
mysql> exit;
Bye

没有评论: