如何在FreeBSD上安裝MySQL?
2.安裝MySQL-Server
# cd /usr/ports/databases/mysql51-server
# make WITH_CHARSET=utf8 WITH_XCHARSET=all
# make install
安裝成功
You already have a group "mysql", so I will use it.
mysql:*:88:88::0:0:MySQL Daemon:/nonexistent:/sbin/nologin
You already have a user "mysql", so I will use it.
************************************************************************
Remember to run mysql_upgrade (with the optional --datadir=<dbdir> flag)
the first time you start the MySQL server after an upgrade from an
earlier version.
************************************************************************
install-info --quiet /usr/local/info/mysql.info /usr/local/info/dir
===> Installing rc.d startup script(s)
===> Compressing manual pages for mysql-server-5.1.33
===> Registering installation for mysql-server-5.1.33
===> SECURITY REPORT:
This port has installed the following files which may act as network
servers and may therefore pose a remote security risk to the system.
/usr/local/libexec/mysqld
This port has installed the following startup scripts which may cause
these network services to be started at boot time.
/usr/local/etc/rc.d/mysql-server
If there are vulnerabilities in these programs there may be a security
risk to the system. FreeBSD makes no guarantee about the security of
ports included in the Ports Collection. Please type 'make deinstall'
to deinstall the port if this is a concern.
For more information, and contact details about the security
status of this software, see the following webpage:
http://www.mysql.com/
2.安裝Php5-MySQL
# cd /usr/ports/databases/php5-mysql
# make
# make install
安裝成功
===> Installing for php5-mysql-5.2.9
===> php5-mysql-5.2.9 depends on file: /usr/local/include/php/main/php.h - found
===> php5-mysql-5.2.9 depends on shared library: mysqlclient.14 - found
===> Generating temporary packing list
===> Checking if databases/php5-mysql already installed
===> Registering installation for php5-mysql-5.2.9
****************************************************************************
The following line has been added to your /usr/local/etc/php/extensions.ini
configuration file to automatically load the installed extension:
extension=mysql.so
****************************************************************************
3.讓開機啟動MySQL
# vi /etc/rc.conf
加入mysql_enable=”yes”
4.匯入資料庫 與 設定MySQL密碼
參考之前的文章
“FreeBSD 停止/啟動 MySQL服務路徑為 /usr/local/etc/rc.d/mysql-server”
5.安裝phpmyadmin
# cd /usr/ports/databases/phpmyadmin
# make
# make install
"建議去官網下載 並解壓到 /usr/local/www/apache22/data/ 會比較快"
6.測試畫面
沒有留言:
張貼留言