それマグで!

知識はカップより、マグでゆっくり頂きます。 takuya_1stのブログ

習慣に早くから配慮した者は、 おそらく人生の実りも大きい。

cygwinでMySQLをインストール。

cygportsからインストールが出来る。

apt-cyg update -m ftp://ftp.cygwinports.org/pub/cygwinports

apt-cyg install mysqld

だったら、setup.exeでもcygportsしたらいけるね

2013-01-17追記

cygports なくてもインストールできた

インストール

mysqld
sdesc: "MySQL database server"
ldesc: "Open Source version of the MySQL database engine.
This package contains only the client components, as the server
is known not to work on Cygwin; search the main list for details.
This can still be used to connect to a native Win32 server or a
remote server."
category: Database
requires: crypt libgcc1 libmysqlclient18 libstdc++6 libwrap0 perl perl-DBI perl-DBD-mysql zlib0
version: 5.5.19-2
install: release-2/mysql/mysqld/mysqld-5.5.19-2.tar.bz2 11589396 fc5003f981c515a262330f0517542d88
source: release-2/mysql/mysql-5.5.19-2-src.tar.bz2 23858510 398b7808be4919a10bcf33ce4f675da1

とりあえずインストールできるけど、起動の仕方が分からない。

4.3.1. mysqld_safe — MySQL サーバ スタートアップ スクリプト

http://dev.mysql.com/doc/refman/5.1/ja/mysqld-safe.html

起動してみる

なるほどmysqld_safe

mysqld_safe --user=takuya

ユーザー関連のエラーで動かない。

動いた!

mysql_install_db
mysqld --user=takuya
mysql -h 127.0.0.1 -u root
create database test;
grant all on test.* to "takuya" ;

mysql_install_dbの結果

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:

/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h letsnote password 'new-password'

Alternatively you can run:
/usr/bin/mysql_secure_installation

which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.

See the manual for more instructions.

You can start the MySQL daemon with:
cd /usr ; /usr/bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl
cd /usr/mysql-test ; perl mysql-test-run.pl

Please report any problems with the /usr/bin/mysqlbug script!


コンパイルの選択肢について

コンパイルの選択肢についてはボツにした

とりあえず。コンパイル遅いけどがんばってコンパイルしてみることにする。

wget http://ftp.iij.ad.jp/pub/db/mysql/Downloads/MySQL-5.5/mysql-5.5.20.tar.gz
tar zxvf 
cd mysql<TAB>
cmake . # cmakeが重要

あれこれ、エラー。ふーむ互換性はあると思ったんだけど。


参考資料
http://phaseshiftllc.com/articles/2008/10/26/installing-mysql-gem-on-windows-cygwin-for-rails.html

cmakeについて
http://d.hatena.ne.jp/heiwaboke/20110324/1300976433
http://yosilove.blog.shinobi.jp/Entry/865/