{"id":60168,"date":"2026-01-15T03:16:58","date_gmt":"2026-01-14T19:16:58","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/60168.html"},"modified":"2026-01-15T03:16:58","modified_gmt":"2026-01-14T19:16:58","slug":"c%e5%ae%9e%e7%8e%b0%e8%af%bb%e5%8f%96kepserverex6-0%e6%9c%8d%e5%8a%a1%e5%99%a8%e4%b8%8a%e7%9a%84%e6%95%b0%e6%8d%ae%ef%bc%8c%e5%ad%98%e5%82%a8%e5%9c%a8mysql%e6%95%b0%e6%8d%ae%e5%ba%93","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/60168.html","title":{"rendered":"C#\u5b9e\u73b0\u8bfb\u53d6KepserverEX6.0\u670d\u52a1\u5668\u4e0a\u7684\u6570\u636e\uff0c\u5b58\u50a8\u5728mysql\u6570\u636e\u5e93"},"content":{"rendered":"<p>\u8981\u4f7f\u7528C#\u4eceKepServerEX\u8bfb\u53d6\u6570\u636e\u5e76\u5b58\u5165MySQL&#xff0c;\u4e3b\u8981\u6709\u4e24\u79cd\u4e3b\u6d41\u65b9\u6cd5&#xff0c;\u4f60\u53ef\u4ee5\u6839\u636e\u9879\u76ee\u9700\u6c42\u9009\u62e9\u3002\u4e0b\u8868\u5bf9\u6bd4\u4e86\u8fd9\u4e24\u79cd\u65b9\u6848\u7684\u6838\u5fc3\u533a\u522b&#xff1a;<\/p>\n<table>\n<tr>\u7279\u6027\/\u9700\u6c42\u65b9\u6848\u4e00&#xff1a;\u4f7f\u7528KepServerEX\u5185\u7f6eDataLogger\u65b9\u6848\u4e8c&#xff1a;\u7f16\u5199C# OPC\u5ba2\u6237\u7aef\u7a0b\u5e8f<\/tr>\n<tbody>\n<tr>\n<td>\u6838\u5fc3\u539f\u7406<\/td>\n<td>\u914d\u7f6eKepServerEX&#xff0c;\u5229\u7528\u5176DataLogger\u529f\u80fd\u5c06\u6570\u636e\u81ea\u52a8\u5199\u5165MySQL-1-8\u3002<\/td>\n<td>\u4f7f\u7528C#\u7f16\u5199\u72ec\u7acb\u7a0b\u5e8f&#xff0c;\u901a\u8fc7OPC DA\/UA\u5e93\u4e3b\u52a8\u8bfb\u53d6\u6570\u636e&#xff0c;\u518d\u5199\u5165MySQL-5-7\u3002<\/td>\n<\/tr>\n<tr>\n<td>\u5f00\u53d1\u91cf<\/td>\n<td>\u6781\u5c0f&#xff0c;\u4e3b\u8981\u4e3a\u914d\u7f6e\u5de5\u4f5c&#xff0c;\u65e0\u9700\u7f16\u7801\u3002<\/td>\n<td>\u5927&#xff0c;\u9700\u5f00\u53d1\u5b8c\u6574\u7684C#\u5ba2\u6237\u7aef\u7a0b\u5e8f\u3002<\/td>\n<\/tr>\n<tr>\n<td>\u7075\u6d3b\u6027<\/td>\n<td>\u4f4e&#xff0c;\u4f9d\u8d56KepServerEX\u7684\u65e5\u5fd7\u7ec4\u3001\u89e6\u53d1\u5668\u7b49\u914d\u7f6e\u3002<\/td>\n<td>\u9ad8&#xff0c;\u53ef\u5b8c\u5168\u81ea\u5b9a\u4e49\u6570\u636e\u903b\u8f91\u3001\u5904\u7406\u89c4\u5219\u548c\u5b58\u50a8\u65b9\u5f0f\u3002<\/td>\n<\/tr>\n<tr>\n<td>\u5b9e\u65f6\u6027<\/td>\n<td>\u4f9d\u8d56\u89e6\u53d1\u5668\u914d\u7f6e&#xff08;\u5982\u5b9a\u65f6\u3001\u503c\u53d8\u5316&#xff09;-8&#xff0c;\u975e\u5f3a\u5b9e\u65f6\u3002<\/td>\n<td>\u9ad8&#xff0c;\u53ef\u7075\u6d3b\u63a7\u5236\u8bfb\u53d6\u9891\u7387\u548c\u65f6\u673a\u3002<\/td>\n<\/tr>\n<tr>\n<td>\u63a8\u8350\u573a\u666f<\/td>\n<td>\u6570\u636e\u8bb0\u5f55\u89c4\u5219\u7b80\u5355\u3001\u5e0c\u671b\u5feb\u901f\u4e0a\u624b\u3001\u65e0\u9700\u4e8c\u6b21\u5f00\u53d1\u3002<\/td>\n<td>\u9700\u8981\u590d\u6742\u6570\u636e\u5904\u7406\u3001\u4e0e\u4e1a\u52a1\u7cfb\u7edf\u6df1\u5ea6\u96c6\u6210\u3001\u6216KepServerEX\u7248\u672c\u4e0d\u652f\u6301DataLogger\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>\u65b9\u6848\u4e00&#xff1a;\u4f7f\u7528KepServerEX\u5185\u7f6eDataLogger&#xff08;\u63a8\u8350\u5feb\u901f\u5b9e\u73b0&#xff09;<\/h4>\n<p>\u5982\u679c\u4f60\u8ffd\u6c42\u5feb\u901f\u90e8\u7f72\u4e14\u6570\u636e\u8bb0\u5f55\u89c4\u5219\u7b80\u5355&#xff0c;\u8fd9\u901a\u5e38\u662f\u6700\u76f4\u63a5\u7684\u65b9\u6cd5-1\u3002\u4e3b\u8981\u6b65\u9aa4\u5305\u62ec&#xff1a;<\/p>\n<li>\n<p>\u5b89\u88c5MySQL ODBC\u9a71\u52a8&#xff1a;\u4eceMySQL\u5b98\u7f51\u4e0b\u8f7d\u5e76\u5b89\u88c5\u5bf9\u5e94\u7cfb\u7edf\u4f4d\u6570\u7684ODBC\u9a71\u52a8&#xff08;\u5982Connector\/ODBC&#xff09;-1-8\u3002<\/p>\n<\/li>\n<li>\n<p>\u914d\u7f6e\u7cfb\u7edfODBC\u6570\u636e\u6e90&#xff1a;\u5728Windows\u7684ODBC\u6570\u636e\u6e90\u7ba1\u7406\u5668\u4e2d&#xff0c;\u6dfb\u52a0\u4e00\u4e2a\u6307\u5411\u4f60MySQL\u6570\u636e\u5e93\u7684\u7cfb\u7edfDSN-1\u3002<\/p>\n<\/li>\n<li>\n<p>\u5728KepServerEX\u4e2d\u914d\u7f6eDataLogger&#xff1a;<\/p>\n<ul>\n<li>\n<p>\u65b0\u5efa\u65e5\u5fd7\u7ec4&#xff0c;\u5728\u00a0General\u00a0\u4e2d\u9009\u62e9\u914d\u7f6e\u597d\u7684MySQL\u6570\u636e\u6e90-8\u3002<\/p>\n<\/li>\n<li>\n<p>\u5728\u00a0Data Map\u00a0\u4e2d&#xff0c;\u6dfb\u52a0\u9700\u8981\u8bb0\u5f55\u7684\u6807\u7b7e&#xff08;Log Items&#xff09;&#xff0c;\u5e76\u6620\u5c04\u5230\u6570\u636e\u5e93\u8868\u7684\u5b57\u6bb5-1\u3002<\/p>\n<\/li>\n<li>\n<p>\u5728\u00a0Triggers\u00a0\u4e2d\u8bbe\u7f6e\u8bb0\u5f55\u89e6\u53d1\u6761\u4ef6&#xff0c;\u5982\u5468\u671f\u89e6\u53d1\u6216\u503c\u53d8\u5316\u89e6\u53d1-8\u3002<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u542f\u52a8\u65e5\u5fd7\u7ec4&#xff1a;\u914d\u7f6e\u5b8c\u6210\u540e\u542f\u52a8&#xff0c;\u6570\u636e\u4fbf\u4f1a\u81ea\u52a8\u5199\u5165MySQL\u3002<\/p>\n<\/li>\n<p>\u8fd9\u4e2a\u65b9\u6848\u7684\u5b8c\u6574\u914d\u7f6e\u793a\u4f8b&#xff0c;\u53ef\u4ee5\u53c2\u8003\u535a\u5ba2\u56ed\u4e0a\u7684\u6559\u7a0b\u300a\u4f7f\u7528Kepserver\u81ea\u5e26DataLogger\u529f\u80fd\u5b9e\u73b0\u5de5\u63a7\u6570\u636e\u8f6c\u50a8\u5173\u7cfb\u578b\u6570\u636e\u5e93\u300b-8\u3002<\/p>\n<h4>\u65b9\u6848\u4e8c&#xff1a;\u7f16\u5199C# OPC\u5ba2\u6237\u7aef\u7a0b\u5e8f&#xff08;\u63a8\u8350\u7075\u6d3b\u63a7\u5236&#xff09;<\/h4>\n<p>\u5982\u679c\u9700\u8981\u66f4\u7075\u6d3b\u5730\u5904\u7406\u6570\u636e&#xff0c;\u6216\u4e0e\u73b0\u6709C#\u7cfb\u7edf\u96c6\u6210&#xff0c;\u53ef\u4ee5\u7f16\u5199\u72ec\u7acb\u7684\u5ba2\u6237\u7aef\u7a0b\u5e8f\u3002\u4e0b\u56fe\u6e05\u6670\u5730\u5c55\u793a\u4e86\u8be5\u65b9\u6848\u7684\u5b8c\u6574\u6570\u636e\u6d41\u548c\u5de5\u4f5c\u6d41\u7a0b&#xff1a;<\/p>\n<p>\u56fe\u8868<\/p>\n<p>\u4ee3\u7801<\/p>\n<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"2072\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/01\/20260114191654-6967eba632a92.png\" width=\"4148\" \/><\/p>\n<p>MySQL\u6570\u636e\u5e93<\/p>\n<p>C# \u5ba2\u6237\u7aef\u7a0b\u5e8f<\/p>\n<p>KepServerEX OPC\u670d\u52a1\u5668<\/p>\n<p>\u201cOPC DA\/UA\u534f\u8bae\u901a\u4fe1\u201d<\/p>\n<p>\u201c\u6267\u884cINSERT\u8bed\u53e5\u201d<\/p>\n<p>\u201c\u901a\u9053(Channel)\u201d<\/p>\n<p>\u201c\u8bbe\u5907(Device)\u201d<\/p>\n<p>\u201c\u6807\u7b7e(Tags)\u201d<\/p>\n<p>\u201c\u521d\u59cb\u5316OPC\u8fde\u63a5 OPCDAAuto.dll \/ OPCFoundation SDK\u201d<\/p>\n<p>\u201c\u8bfb\u53d6\/\u8ba2\u9605\u6807\u7b7e\u503c\u201d<\/p>\n<p>\u201c\u5904\u7406\u6570\u636e\u201d<\/p>\n<p>\u201c\u5199\u5165MySQL\u6570\u636e\u5e93 MySql.Data.MySqlClient\u201d<\/p>\n<p>\u201c\u6570\u636e\u8868 (\u5982 tag_log)\u201d<\/p>\n<p>\u4ee5\u4e0b\u662f\u5b9e\u73b0\u6b64\u65b9\u6848\u7684\u5173\u952e\u6b65\u9aa4\u548c\u4ee3\u7801\u793a\u4f8b\u3002<\/p>\n<p>1. \u521b\u5efa\u6570\u636e\u5e93\u8868 \u9996\u5148&#xff0c;\u5728MySQL\u4e2d\u521b\u5efa\u5b58\u50a8\u6570\u636e\u7684\u8868\u3002<\/p>\n<p>sq<\/p>\n<p>CREATE TABLE &#096;tag_log&#096; (<br \/>\n  &#096;id&#096; INT NOT NULL AUTO_INCREMENT,<br \/>\n  &#096;tag_name&#096; VARCHAR(255) NOT NULL,<br \/>\n  &#096;tag_value&#096; VARCHAR(255),<br \/>\n  &#096;quality&#096; VARCHAR(50),<br \/>\n  &#096;timestamp&#096; DATETIME DEFAULT CURRENT_TIMESTAMP,<br \/>\n  PRIMARY KEY (&#096;id&#096;),<br \/>\n  INDEX &#096;idx_tag_name&#096; (&#096;tag_name&#096;),<br \/>\n  INDEX &#096;idx_timestamp&#096; (&#096;timestamp&#096;)<br \/>\n); <\/p>\n<p>2. \u6838\u5fc3C#\u4ee3\u7801\u5b9e\u73b0 \u521b\u5efa\u4e00\u4e2aC#\u63a7\u5236\u53f0\u6216Windows\u670d\u52a1\u9879\u76ee&#xff0c;\u901a\u8fc7NuGet\u5b89\u88c5\u00a0OpcNetApi\u00a0(\u7528\u4e8eOPC DA) \u6216\u00a0OPCFoundation.NetStandard.Opc.Ua\u00a0(\u7528\u4e8eOPC UA) \u4ee5\u53ca\u00a0MySql.Data\u00a0\u5305\u3002<\/p>\n<p>\u4e0b\u9762\u662f\u4f7f\u7528\u00a0OPC DA\u00a0\u534f\u8bae\u8bfb\u53d6\u6570\u636e\u5e76\u5b58\u5165MySQL\u7684\u7b80\u5316\u793a\u4f8b&#xff1a;<\/p>\n<p>csharp<\/p>\n<\/p>\n<p>using System;<br \/>\nusing Opc;<br \/>\nusing Opc.Da;<br \/>\nusing MySql.Data.MySqlClient;<\/p>\n<p>namespace KepServerToMySql<br \/>\n{<br \/>\n    class Program<br \/>\n    {<br \/>\n        \/\/ \u6570\u636e\u5e93\u8fde\u63a5\u5b57\u7b26\u4e32&#xff0c;\u9700\u4fee\u6539\u4e3a\u4f60\u7684\u4fe1\u606f<br \/>\n        static string mySqlConnStr &#061; &#034;server&#061;localhost;user id&#061;youruser;password&#061;yourpwd;database&#061;yourdb;&#034;;<br \/>\n        \/\/ KepServerEX\u7684OPC DA\u670d\u52a1\u5668\u5730\u5740&#xff0c;\u9700\u4fee\u6539<br \/>\n        static string opcServerUrl &#061; &#034;opcda:\/\/localhost\/Kepware.KEPServerEX.V6&#034;;<\/p>\n<p>        static void Main(string[] args)<br \/>\n        {<br \/>\n            \/\/ \u521d\u59cb\u5316OPC\u670d\u52a1\u5668\u8fde\u63a5<br \/>\n            Opc.Da.Server server &#061; ConnectToOpcServer(opcServerUrl);<br \/>\n            if (server &#061;&#061; null) return;<\/p>\n<p>            \/\/ \u5b9a\u4e49\u8981\u8bfb\u53d6\u7684\u6807\u7b7e\u5217\u8868<br \/>\n            Item[] itemsToRead &#061; new Item[]<br \/>\n            {<br \/>\n                new Item { ItemName &#061; &#034;\u901a\u90531.\u8bbe\u59071.\u6807\u7b7e1&#034; },<br \/>\n                new Item { ItemName &#061; &#034;\u901a\u90531.\u8bbe\u59071.\u6807\u7b7e2&#034; }<br \/>\n            };<\/p>\n<p>            \/\/ \u521b\u5efa\u8ba2\u9605\u5e76\u8bfb\u53d6\u6570\u636e<br \/>\n            Subscription subscription &#061; CreateSubscription(server);<br \/>\n            ItemValueResult[] values &#061; ReadOpcTags(server, itemsToRead);<\/p>\n<p>            \/\/ \u5904\u7406\u5e76\u5b58\u50a8\u8bfb\u53d6\u5230\u7684\u6570\u636e<br \/>\n            if (values !&#061; null)<br \/>\n            {<br \/>\n                ProcessAndStoreValues(values);<br \/>\n            }<\/p>\n<p>            Console.WriteLine(&#034;\u6309\u4efb\u610f\u952e\u9000\u51fa&#8230;&#034;);<br \/>\n            Console.ReadKey();<br \/>\n        }<\/p>\n<p>        static Opc.Da.Server ConnectToOpcServer(string url)<br \/>\n        {<br \/>\n            try<br \/>\n            {<br \/>\n                Opc.URL opcUrl &#061; new Opc.URL(url);<br \/>\n                OpcCom.Factory factory &#061; new OpcCom.Factory();<br \/>\n                Opc.Da.Server server &#061; new Opc.Da.Server(factory, null);<br \/>\n                server.Connect(opcUrl, new Opc.ConnectData(new System.Net.NetworkCredential()));<br \/>\n                Console.WriteLine($&#034;\u6210\u529f\u8fde\u63a5\u5230OPC\u670d\u52a1\u5668: {url}&#034;);<br \/>\n                return server;<br \/>\n            }<br \/>\n            catch (Exception ex)<br \/>\n            {<br \/>\n                Console.WriteLine($&#034;\u8fde\u63a5OPC\u670d\u52a1\u5668\u5931\u8d25: {ex.Message}&#034;);<br \/>\n                return null;<br \/>\n            }<br \/>\n        }<\/p>\n<p>        static Subscription CreateSubscription(Opc.Da.Server server)<br \/>\n        {<br \/>\n            SubscriptionState state &#061; new SubscriptionState<br \/>\n            {<br \/>\n                Name &#061; &#034;DataLoggerSubscription&#034;,<br \/>\n                Active &#061; true,<br \/>\n                UpdateRate &#061; 1000 \/\/ \u66f4\u65b0\u9891\u7387(\u6beb\u79d2)<br \/>\n            };<br \/>\n            return (Subscription)server.CreateSubscription(state);<br \/>\n        }<\/p>\n<p>        static ItemValueResult[] ReadOpcTags(Opc.Da.Server server, Item[] items)<br \/>\n        {<br \/>\n            try<br \/>\n            {<br \/>\n                ItemValueResult[] results &#061; server.Read(items);<br \/>\n                Console.WriteLine($&#034;\u6210\u529f\u8bfb\u53d6 {results.Length} \u4e2a\u6807\u7b7e\u3002&#034;);<br \/>\n                return results;<br \/>\n            }<br \/>\n            catch (Exception ex)<br \/>\n            {<br \/>\n                Console.WriteLine($&#034;\u8bfb\u53d6\u6807\u7b7e\u5931\u8d25: {ex.Message}&#034;);<br \/>\n                return null;<br \/>\n            }<br \/>\n        }<\/p>\n<p>        static void ProcessAndStoreValues(ItemValueResult[] values)<br \/>\n        {<br \/>\n            using (MySqlConnection conn &#061; new MySqlConnection(mySqlConnStr))<br \/>\n            {<br \/>\n                conn.Open();<br \/>\n                foreach (var item in values)<br \/>\n                {<br \/>\n                    \/\/ \u6784\u5efa\u63d2\u5165SQL\u8bed\u53e5<br \/>\n                    string sql &#061; &#064;&#034;INSERT INTO tag_log (tag_name, tag_value, quality)<br \/>\n                                   VALUES (&#064;tagName, &#064;tagValue, &#064;quality);&#034;;<\/p>\n<p>                    using (MySqlCommand cmd &#061; new MySqlCommand(sql, conn))<br \/>\n                    {<br \/>\n                        cmd.Parameters.AddWithValue(&#034;&#064;tagName&#034;, item.ItemName);<br \/>\n                        cmd.Parameters.AddWithValue(&#034;&#064;tagValue&#034;, item.Value?.ToString() ?? &#034;NULL&#034;);<br \/>\n                        cmd.Parameters.AddWithValue(&#034;&#064;quality&#034;, item.Quality.ToString());<\/p>\n<p>                        try<br \/>\n                        {<br \/>\n                            int affectedRows &#061; cmd.ExecuteNonQuery();<br \/>\n                            if (affectedRows &gt; 0)<br \/>\n                            {<br \/>\n                                Console.WriteLine($&#034;\u5df2\u5b58\u50a8\u6807\u7b7e [{item.ItemName}] &#061; {item.Value}&#034;);<br \/>\n                            }<br \/>\n                        }<br \/>\n                        catch (MySqlException dbEx)<br \/>\n                        {<br \/>\n                            Console.WriteLine($&#034;\u6570\u636e\u5e93\u63d2\u5165\u5931\u8d25 ({item.ItemName}): {dbEx.Message}&#034;);<br \/>\n                        }<br \/>\n                    }<br \/>\n                }<br \/>\n            }<br \/>\n        }<br \/>\n    }<br \/>\n} <\/p>\n<h4>\u5173\u952e\u914d\u7f6e\u4e0e\u4f18\u5316\u5efa\u8bae<\/h4>\n<ul>\n<li>\n<p>OPC\u8fde\u63a5\u4e0e\u5b89\u5168&#xff1a;\u786e\u4fddC#\u7a0b\u5e8f\u8fd0\u884c\u5728\u53ef\u8bbf\u95eeKepServerEX OPC\u670d\u52a1\u7684\u673a\u5668\u4e0a&#xff0c;\u53ef\u80fd\u9700\u8981\u914d\u7f6eDCOM\u8bbe\u7f6e&#xff08;\u5bf9\u4e8eOPC DA&#xff09;\u6216\u8bc1\u4e66&#xff08;\u5bf9\u4e8eOPC UA&#xff09;\u3002<\/p>\n<\/li>\n<li>\n<p>\u6570\u636e\u5e93\u4f18\u5316&#xff1a;\u5bf9\u4e8e\u9ad8\u9891\u6570\u636e&#xff0c;\u8003\u8651\u6279\u91cf\u63d2\u5165\u800c\u975e\u9010\u6761\u63d2\u5165&#xff0c;\u5e76\u5b9a\u671f\u5f52\u6863\u5386\u53f2\u6570\u636e\u3002<\/p>\n<\/li>\n<li>\n<p>\u7a0b\u5e8f\u5065\u58ee\u6027&#xff1a;\u5728\u751f\u4ea7\u73af\u5883\u4e2d&#xff0c;\u5c06\u7a0b\u5e8f\u5c01\u88c5\u4e3aWindows\u670d\u52a1&#xff0c;\u5e76\u52a0\u5165\u8be6\u7ec6\u7684\u65e5\u5fd7\u8bb0\u5f55\u548c\u5f02\u5e38\u6062\u590d\u673a\u5236\u3002<\/p>\n<\/li>\n<li>\n<p>KepServerEX\u914d\u7f6e&#xff1a;\u52a1\u5fc5\u5728KepServerEX\u4e2d\u6b63\u786e\u521b\u5efa\u901a\u9053\u3001\u8bbe\u5907\u548c\u9700\u8981\u8bfb\u53d6\u7684\u6570\u636e\u6807\u7b7e&#xff08;Tags&#xff09;-10\u3002<\/p>\n<\/li>\n<\/ul>\n<h4>\u603b\u7ed3<\/h4>\n<p>\u603b\u7684\u6765\u8bf4&#xff0c;\u5982\u679c\u4f60\u7684\u76ee\u6807\u662f\u5feb\u901f\u5b9e\u73b0\u4e00\u4e2a\u7a33\u5b9a\u3001\u65e0\u9700\u5f00\u53d1\u7684\u6570\u636e\u8bb0\u5f55\u529f\u80fd&#xff0c;\u65b9\u6848\u4e00&#xff08;DataLogger&#xff09;\u662f\u9996\u9009-1-8\u3002\u5982\u679c\u4f60\u7684\u9700\u6c42\u6d89\u53ca\u590d\u6742\u7684\u6570\u636e\u5904\u7406\u903b\u8f91\u3001\u4e0e\u73b0\u6709C#\u7cfb\u7edf\u7684\u6df1\u5ea6\u96c6\u6210&#xff0c;\u6216\u8005KepServerEX\u7248\u672c\u4e0d\u652f\u6301DataLogger&#xff0c;\u90a3\u4e48\u65b9\u6848\u4e8c&#xff08;\u7f16\u5199C#\u5ba2\u6237\u7aef&#xff09;\u00a0\u63d0\u4f9b\u4e86\u6700\u5927\u7684\u7075\u6d3b\u6027\u548c\u63a7\u5236\u529b\u3002<\/p>\n<p>\u4f60\u53ef\u4ee5\u6839\u636e\u4e0a\u8ff0\u5bf9\u6bd4\u548c\u81ea\u8eab\u60c5\u51b5\u505a\u51fa\u9009\u62e9\u3002\u5982\u679c\u4f60\u80fd\u544a\u8bc9\u6211\u66f4\u591a\u5173\u4e8e\u4f60\u7684\u9879\u76ee\u7ec6\u8282&#xff08;\u4f8b\u5982\u6570\u636e\u70b9\u7684\u6570\u91cf\u3001\u5e0c\u671b\u8bfb\u53d6\u7684\u9891\u7387\u3001\u662f\u5426\u6709\u7279\u6b8a\u7684\u6570\u636e\u5904\u7406\u9700\u6c42\u7b49&#xff09;&#xff0c;\u6211\u53ef\u4ee5\u4e3a\u4f60\u63d0\u4f9b\u66f4\u5177\u4f53\u7684\u5efa\u8bae\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8981\u4f7f\u7528C#\u4eceKepServerEX\u8bfb\u53d6\u6570\u636e\u5e76\u5b58\u5165MySQL&#xff0c;\u4e3b\u8981\u6709\u4e24\u79cd\u4e3b\u6d41\u65b9\u6cd5&#xff0c;\u4f60\u53ef\u4ee5\u6839\u636e\u9879\u76ee\u9700\u6c42\u9009\u62e9\u3002\u4e0b\u8868\u5bf9\u6bd4\u4e86\u8fd9\u4e24\u79cd\u65b9\u6848\u7684\u6838\u5fc3\u533a\u522b&#xff1a;<br \/>\n\u7279\u6027\/\u9700\u6c42\u65b9\u6848\u4e00&#xff1a;\u4f7f\u7528KepServerEX\u5185\u7f6eDataLogger\u65b9\u6848\u4e8c&#xff1a;\u7f16\u5199C# OPC\u5ba2\u6237\u7aef\u7a0b\u5e8f\u6838\u5fc3\u539f\u7406\u914d\u7f6eKepServerEX&#xff0c;\u5229\u7528\u5176DataLogger\u529f\u80fd\u5c06\u6570\u636e\u81ea\u52a8\u5199\u5165MySQL-1-8\u3002\u4f7f\u7528C#\u7f16\u5199\u72ec\u7acb\u7a0b\u5e8f&#xff0c;\u901a\u8fc7OPC DA\/<\/p>\n","protected":false},"author":2,"featured_media":60167,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[55],"topic":[],"class_list":["post-60168","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-c"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>C#\u5b9e\u73b0\u8bfb\u53d6KepserverEX6.0\u670d\u52a1\u5668\u4e0a\u7684\u6570\u636e\uff0c\u5b58\u50a8\u5728mysql\u6570\u636e\u5e93 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/60168.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"C#\u5b9e\u73b0\u8bfb\u53d6KepserverEX6.0\u670d\u52a1\u5668\u4e0a\u7684\u6570\u636e\uff0c\u5b58\u50a8\u5728mysql\u6570\u636e\u5e93 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u8981\u4f7f\u7528C#\u4eceKepServerEX\u8bfb\u53d6\u6570\u636e\u5e76\u5b58\u5165MySQL&#xff0c;\u4e3b\u8981\u6709\u4e24\u79cd\u4e3b\u6d41\u65b9\u6cd5&#xff0c;\u4f60\u53ef\u4ee5\u6839\u636e\u9879\u76ee\u9700\u6c42\u9009\u62e9\u3002\u4e0b\u8868\u5bf9\u6bd4\u4e86\u8fd9\u4e24\u79cd\u65b9\u6848\u7684\u6838\u5fc3\u533a\u522b&#xff1a; \u7279\u6027\/\u9700\u6c42\u65b9\u6848\u4e00&#xff1a;\u4f7f\u7528KepServerEX\u5185\u7f6eDataLogger\u65b9\u6848\u4e8c&#xff1a;\u7f16\u5199C# OPC\u5ba2\u6237\u7aef\u7a0b\u5e8f\u6838\u5fc3\u539f\u7406\u914d\u7f6eKepServerEX&#xff0c;\u5229\u7528\u5176DataLogger\u529f\u80fd\u5c06\u6570\u636e\u81ea\u52a8\u5199\u5165MySQL-1-8\u3002\u4f7f\u7528C#\u7f16\u5199\u72ec\u7acb\u7a0b\u5e8f&#xff0c;\u901a\u8fc7OPC DA\/\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/60168.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-01-14T19:16:58+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/01\/20260114191654-6967eba632a92.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/60168.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/60168.html\",\"name\":\"C#\u5b9e\u73b0\u8bfb\u53d6KepserverEX6.0\u670d\u52a1\u5668\u4e0a\u7684\u6570\u636e\uff0c\u5b58\u50a8\u5728mysql\u6570\u636e\u5e93 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-01-14T19:16:58+00:00\",\"dateModified\":\"2026-01-14T19:16:58+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/60168.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/60168.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/60168.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"C#\u5b9e\u73b0\u8bfb\u53d6KepserverEX6.0\u670d\u52a1\u5668\u4e0a\u7684\u6570\u636e\uff0c\u5b58\u50a8\u5728mysql\u6570\u636e\u5e93\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"C#\u5b9e\u73b0\u8bfb\u53d6KepserverEX6.0\u670d\u52a1\u5668\u4e0a\u7684\u6570\u636e\uff0c\u5b58\u50a8\u5728mysql\u6570\u636e\u5e93 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/60168.html","og_locale":"zh_CN","og_type":"article","og_title":"C#\u5b9e\u73b0\u8bfb\u53d6KepserverEX6.0\u670d\u52a1\u5668\u4e0a\u7684\u6570\u636e\uff0c\u5b58\u50a8\u5728mysql\u6570\u636e\u5e93 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u8981\u4f7f\u7528C#\u4eceKepServerEX\u8bfb\u53d6\u6570\u636e\u5e76\u5b58\u5165MySQL&#xff0c;\u4e3b\u8981\u6709\u4e24\u79cd\u4e3b\u6d41\u65b9\u6cd5&#xff0c;\u4f60\u53ef\u4ee5\u6839\u636e\u9879\u76ee\u9700\u6c42\u9009\u62e9\u3002\u4e0b\u8868\u5bf9\u6bd4\u4e86\u8fd9\u4e24\u79cd\u65b9\u6848\u7684\u6838\u5fc3\u533a\u522b&#xff1a; \u7279\u6027\/\u9700\u6c42\u65b9\u6848\u4e00&#xff1a;\u4f7f\u7528KepServerEX\u5185\u7f6eDataLogger\u65b9\u6848\u4e8c&#xff1a;\u7f16\u5199C# OPC\u5ba2\u6237\u7aef\u7a0b\u5e8f\u6838\u5fc3\u539f\u7406\u914d\u7f6eKepServerEX&#xff0c;\u5229\u7528\u5176DataLogger\u529f\u80fd\u5c06\u6570\u636e\u81ea\u52a8\u5199\u5165MySQL-1-8\u3002\u4f7f\u7528C#\u7f16\u5199\u72ec\u7acb\u7a0b\u5e8f&#xff0c;\u901a\u8fc7OPC DA\/","og_url":"https:\/\/www.wsisp.com\/helps\/60168.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-01-14T19:16:58+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/01\/20260114191654-6967eba632a92.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"3 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/60168.html","url":"https:\/\/www.wsisp.com\/helps\/60168.html","name":"C#\u5b9e\u73b0\u8bfb\u53d6KepserverEX6.0\u670d\u52a1\u5668\u4e0a\u7684\u6570\u636e\uff0c\u5b58\u50a8\u5728mysql\u6570\u636e\u5e93 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-01-14T19:16:58+00:00","dateModified":"2026-01-14T19:16:58+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/60168.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/60168.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/60168.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"C#\u5b9e\u73b0\u8bfb\u53d6KepserverEX6.0\u670d\u52a1\u5668\u4e0a\u7684\u6570\u636e\uff0c\u5b58\u50a8\u5728mysql\u6570\u636e\u5e93"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/60168","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=60168"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/60168\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/60167"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=60168"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=60168"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=60168"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=60168"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}