Install Mysql on FreeBSD

FreeBSDにMysqlを入れる。設定する。

現在(2004/8/1)、まだ、目的のMovableTypeで使えるようになっていません。

portsを使いインストールする

# cd /usr/ports/database/mysql40-server
# make
# make install
# make clean

設定する

# cp /usr/local/share/mysql/my-large.cnf /var/db/mysql/my.cnf
# cd /var/db/mysql
# vi my.cnf

my.cnfを編集する

#skip-networking

のコメントを外す。

skip-networking

rootのパスワードを設定する

/usr/local/bin/mysqladmin -u root password "rootpassword"

ユーザーの追加

MovableTypeが使うユーザーの追加。

‘‘ユーザー名’’ user
‘‘パスワード’’ password
# mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 7 to server version: 4.0.20

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> grant select,insert,update,delete,create,drop on mtdb.* to user@localhosts identified by 'password';
Query OK, 0 rows affected (0.04 sec)

mysql>

MySQLの管理のためphpMyAdminをインストールする

# cd /usr/ports/database/phpmyadmin
# make
# make install
# make clean

エラー

database/mysql41-*をインストールし、phpMyAdminをインストールすると、以下のエラーが出ます。

phpMyAdmin 2.5.7-pl1へようこそ

phpMyAdmin tried to connect to the MySQL server, and the server rejected the
 connection. You should check the host, username and password in config.inc.php
 and make sure that they correspond to the information given by the
 administrator of the MySQL server.

エラー

MySQLのメッセージ --> 
#1251 - Client does not support authentication protocol requested by server;
 consider upgrading MySQL client