《MysqL教程MysqL安装步骤图文教程及中文乱码的解决方案》要点:
本文介绍了MysqL教程MysqL安装步骤图文教程及中文乱码的解决方案,希望对您有用。如果有疑问,可以联系我们。
MysqL Server安装步骤如下所示:MysqL必读
1安装MysqL ServerMysqL必读
MysqL必读MysqL必读MysqL必读MysqL必读MysqL必读MysqL必读MysqL必读MysqL必读MysqL必读MysqL必读MysqL必读MysqL必读MysqL必读MysqL必读MysqL必读MysqL必读MysqL必读MysqL必读MysqL必读MysqL必读2 安装MysqLServer管理工具MysqL必读
MysqL必读MysqL必读MysqL必读MysqL必读MysqL必读MysqL必读MysqL必读MysqL必读MysqL必读解压中文语言包,将文件复制到安装目录下覆盖MysqL必读
MysqL必读MysqL必读MysqL必读MysqL必读文件覆盖后,打开软件设置语言为中文(CN)MysqL必读
MysqL必读MysqL必读3 MysqLServer开发注意事项(C#)MysqL必读
1.联接字符串:"Server=localhost;Database=100;UID=root;Pwd='root'"MysqL必读
2.引用mysql.data.dll;using mysql.data.MysqLClIEnt;MysqL必读
3.使用MysqLConnection、MysqLParameter、MysqLDataAdapter、MysqLCommandBuilder、MysqLCommand、MysqLDataAdapter、MysqLTransaction等类MysqL必读
5.使用MysqLCommand. ExecuteScalar()方法返回的object如果要转为int类型,必须使用Convert来强制转换,否则可能会出错.MysqL必读
6.修改记录时,字段数据类型如果为Bit类型的时候,SQL语句中的字段值要使用Ture或False,不能像sqlServer中一样使用0或1.MysqL必读
7.命令行工具:MysqL必读
public class Cmd{/// <summary>/// 执行Cmd命令/// </summary>/// <param name="workingDirectory">要启动的进程的目录</param>/// <param name="command">要执行的命令</param>public static voID StartCmd(String workingDirectory,String command){Process p = new Process();p.StartInfo.filename = "cmd.exe";p.StartInfo.WorkingDirectory = workingDirectory;p.StartInfo.UseShellExecute = false;p.StartInfo.RedirectStandardinput = true;p.StartInfo.RedirectStandardOutput = true;p.StartInfo.RedirectStandardError = true;p.StartInfo.CreateNowindow = true;p.Start();p.Standardinput.Writeline(command);Thread.Sleep(10000);//p.Standardinput.Writeline("exit");}public static voID StartCmd(){Process p = new Process();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();p.Standardinput.Writeline("net stop MysqL");Thread.Sleep(5000);p.Standardinput.Writeline("net start MysqL");Thread.Sleep(5000);p.Standardinput.Writeline("exit");}}
备份:MysqL必读
public static bool BackUp(string backupPath){try{//构建执行的命令StringBuilder sbcommand = new StringBuilder();sbcommand.AppendFormat("MysqLdump -f -l -q -uroot -proot ScIEndox50 -r \"{0}\"",backupPath);String command = sbcommand.ToString();//获取MysqLdump.exe所在路径String appDirecroty = @"C:\Program files\MysqL\MysqL Server 5.5\bin\";Cmd.StartCmd(appDirecroty,command);Cmd.StartCmd();//重启MysqL服务MessageBox.Show(@"数据库已成功备份到 " + backupPath + " 文件中","提示",MessageBoxbuttons.OK,MessageBoxIcon.information);return true;}catch (Exception){MessageBox.Show("数据库备份失败!");return false;}}
还原:MysqL必读
/// <summary>/// 数据还原/// </summary>/// <param name="filePath">文件路径</param>/// <returns></returns>public static bool RestoreDB(string filePath){try{StringBuilder sbcommand = new StringBuilder();//在文件路径后面加上""避免空格出现异常sbcommand.AppendFormat("MysqL -uroot -proot ScIEndox50 <\"{0}\"",filePath);String command = sbcommand.ToString();//获取MysqL.exe所在路径String appDirecroty = @"C:\Program files\MysqL\MysqL Server 5.5\bin\";DialogResult result = MessageBox.Show("您是否真的想覆盖以前的数据库吗?那么以前的数据库数据将丢失!!!","警告",MessageBoxbuttons.YesNo,MessageBoxIcon.Warning);if (result == DialogResult.Yes){Cmd.StartCmd(appDirecroty,command);Cmd.StartCmd();//重启MysqL服务MessageBox.Show("数据库还原成功!");return true;}return false;}catch (Exception){MessageBox.Show("数据库还原失败!");return false;}}
以上所述是小编给大家介绍的MysqL安装步骤图文教程及中文乱码的解决方案,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的.在此也非常感谢大家对内存溢出PHP网站的支持!MysqL必读
总结以上是内存溢出为你收集整理的MYSQL教程MySql安装步骤图文教程及中文乱码的解决方案全部内容,希望文章能够帮你解决MYSQL教程MySql安装步骤图文教程及中文乱码的解决方案所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)