phpからmysqlにつなぐための設定
mysqliを使いたい場合も同じ
sudo aptitude install mysql-client sudo aptitude intstall php-5-mysql
Serve側の設定
Windowsなど外部から接続できるようにする。
/etc/mysql/my.cnfを編集
sudo vim /etc/mysql/my.cnf
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address = 127.0.0.1
下記の部分をコメントアウト。もしくは許可したいものを追加
bind-address = 127.0.0.1
再起動する
reloadじゃだめだった。
sudo /etc/init.d/mysql restart