親フォルダ
using System;
using System.Data.Odbc;

namespace MySQL
{
	class Program
	{
		static void Main(string[] args)
		{
			// データベースのユーザを入力する( root )
			Console.Write("ユーザ :");
			string user = Console.ReadLine();
			Console.WriteLine(user);

			// 接続文字列を作成するオブジェクト
			OdbcConnectionStringBuilder builder = new OdbcConnectionStringBuilder();

			// HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI
			// HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\ODBC\ODBCINST.INI
			// MySQL ODBC 5.3 Unicode Driver

			// 接続文字列を作成する為の情報を渡す
			builder.Driver = "MySQL ODBC 5.3 Unicode Driver";
			builder.Add("SERVER", "localhost");
			builder.Add("DATABASE", "lightbox");
			builder.Add("UID", user);
			builder.Add("PWD", "");

			Console.WriteLine(builder.ConnectionString);

			// 接続用のオブジェクト
			OdbcConnection myCon = new OdbcConnection();

			// 接続用のオブジェクトに接続文字列を渡す
			myCon.ConnectionString = builder.ConnectionString;

			try
			{
				// DB の接続
				myCon.Open();

				string myQuery = "SELECT 社員マスタ.*,DATE_FORMAT(生年月日,'%Y-%m-%d') as 誕生日 from 社員マスタ";

				// SELECT 実行用のオブジェクトを作成
				OdbcCommand myCommand = new OdbcCommand();
				// 実行する為に必要な情報をセット
				myCommand.CommandText = myQuery;
				myCommand.Connection = myCon;

				// 実行後にレコードセットを取得する為のオブジェクトを作成
				OdbcDataReader myReader;
				// ここで SELECT を実行してその結果をオブジェクトに格納する
				myReader = myCommand.ExecuteReader();

				while (myReader.Read())
				{
					// 番号による列データの取り出し
					string fld1 = myReader.GetValue(0).ToString();
					string fld2 = myReader.GetValue(1).ToString();
					Console.WriteLine($"番号:{fld1} {fld2}");

					// 列名による取り出し
					string col1 = "社員コード";
					string col2 = "氏名";

					int no1 = myReader.GetOrdinal(col1);
					int no2 = myReader.GetOrdinal(col2);

					fld1 = myReader.GetValue(no1).ToString();
					fld2 = myReader.GetValue(no2).ToString();
					Console.WriteLine($"列名:{fld1} {fld2}");
				}


				myCommand.Dispose();

				// 接続を閉じる
				myCon.Close();
			}
			catch (Exception ex)
			{

				Console.WriteLine(ex.Message);
			}

			// 接続オブジェクトを廃棄する
			myCon.Dispose();


			Console.ReadLine();
		}
	}
}