C# 連接mysql,連接后顯示多個線程池

數據庫連接字符串

return string.Concat(new string[]
            {
                "Database='",
                this._DBName,
                "';Data Source='",
                this._ServerName,
                "';Persist Security Info=True;min pool size=20;max pool size=10240;Connection Timeout = 15;Pooling=true;User Id='",
                this._LoginUser,
                "';Password='",
                this._PassWord,
                "';charset='",
                this._Charset,
                "';AllowUserVariables=true;pooling=true"
            });

連接成功,连接池就会初始化并建立设定的最小连接数 (min pool size)

-- 顯示連接數-- 會顯示多個線程池
SHOW PROCESSLIST

參考:https://www.cnblogs.com/supersnowyao/p/8652722.html

猜你喜欢

转载自blog.csdn.net/losedguest/article/details/83897217
今日推荐