一、mycat

  单体的mysql已经过去

二、引用Mycat包

 二、.Net 连接mycat

三、代码

using Pomelo.Data.MyCat;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            using (var conn = new MyCatConnection("server=47.94.174.85;database=adosample;uid=root;pwd=yourpwd"))
            {
                conn.Open();
                using (var cmd = new MyCatCommand("INSERT INTO `test` (`content`) VALUES ('Hello MyCat')", conn))
                {
                    cmd.ExecuteNonQuery();
                }
            }
        }
    }
}

  

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-10-08
  • 2022-12-23
  • 2021-09-26
  • 2021-09-09
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-05-15
  • 2022-12-23
  • 2021-07-30
  • 2021-07-11
  • 2022-12-23
相关资源
相似解决方案