激情久久久_欧美视频区_成人av免费_不卡视频一二三区_欧美精品在欧美一区二区少妇_欧美一区二区三区的

服務(wù)器之家:專(zhuān)注于服務(wù)器技術(shù)及軟件下載分享
分類(lèi)導(dǎo)航

Mysql|Sql Server|Oracle|Redis|MongoDB|PostgreSQL|Sqlite|DB2|mariadb|Access|數(shù)據(jù)庫(kù)技術(shù)|

服務(wù)器之家 - 數(shù)據(jù)庫(kù) - Mysql - MySql安裝步驟圖文教程及中文亂碼的解決方案

MySql安裝步驟圖文教程及中文亂碼的解決方案

2020-06-21 17:37BennyHua Mysql

這篇文章主要介紹了MySql安裝步驟圖文教程及中文亂碼的解決方案,非常不錯(cuò),具有參考借鑒價(jià)值,需要的朋友可以參考下

MySql Server安裝步驟如下所示:

1安裝MySql Server

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安裝步驟圖文教程及中文亂碼的解決方案

解壓中文語(yǔ)言包,將文件復(fù)制到安裝目錄下覆蓋

MySql安裝步驟圖文教程及中文亂碼的解決方案

MySql安裝步驟圖文教程及中文亂碼的解決方案

MySql安裝步驟圖文教程及中文亂碼的解決方案

MySql安裝步驟圖文教程及中文亂碼的解決方案

文件覆蓋后,打開(kāi)軟件設(shè)置語(yǔ)言為中文(CN)

MySql安裝步驟圖文教程及中文亂碼的解決方案

MySql安裝步驟圖文教程及中文亂碼的解決方案

3 MySqlServer開(kāi)發(fā)注意事項(xiàng)(C#)

1.聯(lián)接字符串:"Server=localhost;Database=100;Uid=root;Pwd='root'"

2.引用MySql.Data.dll;using MySql.Data.MySqlClient;

3.使用MySqlConnection、MySqlParameter、MySqlDataAdapter、MySqlCommandBuilder、MySqlCommand、MySqlDataAdapter、MySqlTransaction等類(lèi)

5.使用MySqlCommand. ExecuteScalar()方法返回的object如果要轉(zhuǎn)為int類(lèi)型,必須使用Convert來(lái)強(qiáng)制轉(zhuǎn)換,否則可能會(huì)出錯(cuò)。

6.修改記錄時(shí),字段數(shù)據(jù)類(lèi)型如果為Bit類(lèi)型的時(shí)候,Sql語(yǔ)句中的字段值要使用Ture或False,不能像SqlServer中一樣使用0或1。

7.命令行工具:

?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
public class Cmd
{
/// <summary>
/// 執(zhí)行Cmd命令
/// </summary>
/// <param name="workingDirectory">要啟動(dòng)的進(jìn)程的目錄</param>
/// <param name="command">要執(zhí)行的命令</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");
}
}

備份:

?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
public static bool BackUp(string backupPath)
{
try
{
//構(gòu)建執(zhí)行的命令
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 FilesMySQLMySQL Server 5.5in";
Cmd.StartCmd(appDirecroty, command);
Cmd.StartCmd();//重啟mysql服務(wù)
MessageBox.Show(@"數(shù)據(jù)庫(kù)已成功備份到 " + backupPath + " 文件中", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
return true;
}
catch (Exception)
{
MessageBox.Show("數(shù)據(jù)庫(kù)備份失敗!");
return false;
}
}

還原:

?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/// <summary>
/// 數(shù)據(jù)還原
/// </summary>
/// <param name="FilePath">文件路徑</param>
/// <returns></returns>
public static bool RestoreDB(string FilePath)
{
try
{
StringBuilder sbcommand = new StringBuilder();
//在文件路徑后面加上""避免空格出現(xiàn)異常
sbcommand.AppendFormat("mysql -uroot -proot Sciendox50 <"{0}"", FilePath);
String command = sbcommand.ToString();
//獲取mysql.exe所在路徑
String appDirecroty = @"C:Program FilesMySQLMySQL Server 5.5in";
DialogResult result = MessageBox.Show("您是否真的想覆蓋以前的數(shù)據(jù)庫(kù)嗎?那么以前的數(shù)據(jù)庫(kù)數(shù)據(jù)將丟失!!!", "警告", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
if (result == DialogResult.Yes)
{
Cmd.StartCmd(appDirecroty, command);
Cmd.StartCmd();//重啟mysql服務(wù)
MessageBox.Show("數(shù)據(jù)庫(kù)還原成功!");
return true;
}
return false;
}
catch (Exception)
{
MessageBox.Show("數(shù)據(jù)庫(kù)還原失敗!");
return false;
}
}

以上所述是小編給大家介紹的MySql安裝步驟圖文教程及中文亂碼的解決方案,希望對(duì)大家有所幫助,如果大家有任何疑問(wèn)請(qǐng)給我留言,小編會(huì)及時(shí)回復(fù)大家的。在此也非常感謝大家對(duì)服務(wù)器之家網(wǎng)站的支持!

原文鏈接:http://www.cnblogs.com/BennyHua/archive/2016/08/30/5821808.html

延伸 · 閱讀

精彩推薦
主站蜘蛛池模板: v11av在线播放 | 国产一级爱c视频 | 欧美乱论 | 国产精品男女 | 免费在线观看午夜视频 | 国产乱淫av一区二区三区 | 久久精品片 | 99久久精品免费 | 久久国产在线观看 | 国产精品自拍啪啪 | 欧美成人h版在线观看 | 欧美粗暴analvideos | 日本精品网 | 国产三级在线视频观看 | 久久久一区二区三区视频 | 5xx免费看| 九九精品影院 | 久久精品国产清自在天天线 | 精品国产一区二 | 亚州综合 | 欧美中文字幕一区二区三区亚洲 | 欧美黄一级 | 欧美综合在线观看视频 | 亚洲第一男人天堂 | 一区二区三区无码高清视频 | 成人在线观看免费观看 | 欧美成人午夜影院 | 99精品无人区乱码在线观看 | 成人午夜精品 | 激情黄页 | 国产女做a爱免费视频 | 泰剧19禁啪啪无遮挡大尺度 | 久久精品资源 | 国产亲子伦在线观看 | 国产乱淫a∨片免费视频 | 在线亚洲观看 | 亚洲日韩中文字幕一区 | 亚洲成人在线视频网站 | 影视免费观看 | 黄a大片 | 美女污污视频在线观看 |