1.c#可以调用msyql的导入导出命令,但是需要先判断客户机是否安装了mysql,及其安装mysql的路径问题。
2.查询mysql安装路径的函数
private string GetMysqlPath() { string strPath = string.Empty; string strsql = "select @@basedir as basePath from dual "; strPath = 数据库执行当前的strsqlstrPath = strPath.Replace("/", "\\"); return strPath; }
strmysqlPath= GetMysqlPath() + "\\bin";