cygwinでmysqlを起動と初期設定

http://takuya-1st.hatenablog.jp/entry/20120804/1346266936
を参考に.

/usr/share/mysql/mysql.server start --skip-grant-tables

たぶん権限関係でいろいろいわれるので、
以下のサイトを参考にする.
Access denied for user ‘root’@’localhost’ (using password: NO)
とか
http://www.goofoo.jp/2011/11/1457

コマンド

service mysqld stop
mysqld_safe --skip-grant-tables &

mysql

use mysql;
truncate table user;
flush privileges;
grant all privileges on *.* to root@localhost identified by 'パスワード' with grant option;
flush privileges;

パスワードを設定ない場合

grant all privileges on *.* to root@localhost identified by '' with grant option;

再起動

service mysqld start