*http://dev.mysql.com/downloads/connector/
====[[C#]]から接続====
=====DML(create table)=====
<pre>
public void CreateTable(string host, string database, string user, string password)
{
// create database jra default character set utf8;
// create user 'jra'@'localhost' identified by 'new password';
// create user 'jra'@'%' identified by 'new password';
// grant all privileges on *.* to 'jra'@'%' with grant option;
using (var conn = new MySqlConnection(GetConnStr(host, database, user, password)))
{
conn.Open();
var createTable = @"
create table jra_data (
rec_spec varchar(2) not null,
key varchar(100) not null,
make_date varchar(10) not null,
data_type varchar(1) not null,
data mediumtext,
primary key(rec_spec, key)
)";
var cmd = new MySqlCommand(createTable);
cmd.Connection = conn;
cmd.ExecuteNonQuery();
}
}
</pre>
=====データ取得=====
<pre>
using MySql.Data.MySqlClient;
using System;
}
}
</pre>