[[MySQL on FreeBSD]]
CONTENTS
#contents
----
Lastmodified &lastmod;
----
*MySQL を 5.5.0 以降にアップグレードしてください 2015年8月17日[#h607e46c]
portupgrade したphpMyAdminにアクセスしたらエラー。MySQLは5.1でした。
ということで、取り敢えず phpMyAdmin-4.0.10.10-all-languages.tar.gz を取ってきて、解凍インストール。
と同時に、5.1から5.5以上にUPするテスト。
* # mysql_upgrade -u root -p [#ve59ebf5]
** # portinstall databases/mysql51-client [#ie87703b]
** # portinstall databases/mysql51-server [#b74106aa]
Creating group 'mysql' with gid '88'.
Creating user 'mysql' with uid '88'.
pw: user 'mysql' disappeared during update
************************************************************************
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.
************************************************************************
===> 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/
===> Cleaning for mysql51-server-5.1.73_2
** /usr/local/etc/my.cnf [#y3a9bca4]
コピーして移す
** /etc/rc.conf [#i4b671c2]
mysql_enable="YES"
mysql_dbdir="MySQLデータベースディレクトリのフルパス"
書き込む。
** MySQL db をコピー [#ve9c034c]
# /usr/local/etc/rc.d/mysql-server start
Starting mysql.
su: unknown login: mysql
/usr/local/etc/rc.d/mysql-server: WARNING: failed to start mysql
なんか、初めて見るエラー??? http://www.administration-systeme.com/freebsd-apache-mysql-et-php/
# pwd_mkdb -p /etc/master.passwd
# vipw でmysqlの追加を確認
** portinstall lang/php5 [#l08a36b4]
** portinstall lang/php5-extensions [#y24f9976]
# php -v
Created directory: /var/net-snmp
Created directory: /var/net-snmp/mib_indexes
PHP 5.4.44 (cli) (built: Aug 18 2015 13:17:42)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
** phpMyAdmin をインストール [#jf85ff0d]
----
Total access &counter(total);:本日 &counter(today);:昨日 &counter(yesterday);
#counter([total|today|yesterday]);