MySql自制服务器-创新互联

自制mysql服务器的关键程序,把这段程序放到线程中运行就可以开启mysql服务了。需要的同学可以参考下。

成都创新互联网站建设公司一直秉承“诚信做人,踏实做事”的原则,不欺瞒客户,是我们最起码的底线! 以服务为基础,以质量求生存,以技术求发展,成交一个客户多一个朋友!专注中小微企业官网定制,做网站、网站设计,塑造企业网络形象打造互联网企业效应。
private void runMysql()
{
    Process p=new Process();
    string constr="server=localhhost;port=3306;database=dbname;user=root;password='123456';";
    MySqlConnection con=new MySqlConnection(constr);
    p.StartInfo.FileName="cmd.exe";
    p.StartInfo.UseShellExecute=false;
    p.StartInfo.RedirectStandardInput=true;
    p.StartInfo.RedirectStandardOutput=true;
    p.StartInfo.RedirectStandardError=true;
    p.StartInfo.CreateNoWindow=true;
    p.Start();
    //mysql执行文件的位置
    string spath="c:\\users\\...\\mysql\\bin\\mysqld.exe";
    System.IO.StreamWriter sw=p.StandardInput;
    sw.WriteLine(spath);
    sw.Flush();
    p.StandardInput.WriteLine("exit");
    //线程中显示信息需要用到委托,具体参考FillComboBoxCallback
    ShowMessage("Mysql在初始化...");
    while(Process.GetProcessNyName(&

你是否还在寻找稳定的海外服务器提供商?创新互联www.cdcxhl.cn海外机房具备T级流量清洗系统配攻击溯源,准确流量调度确保服务器高可用性,企业级服务器适合批量采购,新人活动首月15元起,快前往官网查看详情吧


文章题目:MySql自制服务器-创新互联
转载注明:http://myzitong.com/article/djeghi.html