Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

MysqlµÄDBHelper.cs

using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using MySql.Data.MySqlClient;
namespace i_salesDAL
{
public class DBHelper
{
//Òýµ¼Êý¾Ý¿âÁ¬½ÓÊý¾Ý¿âµ÷ÓÃWeb.ConfigÎļþ
private static MySqlConnection connection;
//´´½¨Á¬½Ó
public static MySqlConnection Connection
{
get
{
MySqlConnection myConn = new MySqlConnection("server=localhost;user id=root;password=root;database=google;CharSet=gb2312;");
string connectionString = myConn.ConnectionString;
if (connection == null)
{
connection = new MySqlConnection(connectionString);
//´ò¿ªÁ¬½Ó
connection.Open();
}
else if (connection.State == System.Data.ConnectionState.Closed)
{
connection.Open();
}
else if (connection.State == System.Data.ConnectionState.Broken)
{
connection.Close();
connection.Open();
}
return connection;
}
}
//£¨Î޲Σ©·µ»ØÖ´ÐеÄÐÐÊý(ɾ³ýÐ޸ĸüÐÂ)
public static int ExecuteCommand(string safeSql)
{
MySqlCommand cmd = new MySqlCommand(safeSql, Connection);
int result = cmd.ExecuteNonQuery();
return result;
}
//£¨ÓвΣ©
public static int ExecuteCommand(string sql, params MySqlParameter[] values)
{
MySqlCommand cmd = new MySqlCommand(sql, Connection);
cmd.Parameters.AddRange(values);
return cmd.ExecuteNonQuery();
}
//£¨Î޲Σ©·µ»ØµÚÒ»ÐеÚÒ»ÁÐ(ɾ³ýÐ޸ĸüÐÂ)
public static int GetScalar(string safeSql)
{
MySqlCommand cmd = new MySqlCommand(safeSql, Con


Ïà¹ØÎĵµ£º

·Ç³£²»´íµÄMySQLÓÅ»¯µÄ8Ìõ¾­Ñé

1¡¢Ñ¡È¡×îÊÊÓõÄ×Ö¶ÎÊôÐÔ

MySQL
¿ÉÒԺܺõÄÖ§³Ö´óÊý¾ÝÁ¿µÄ´æÈ¡£¬µ«ÊÇÒ»°ã˵À´£¬Êý¾Ý¿âÖеıíԽС£¬ÔÚËüÉÏÃæÖ´ÐеIJéѯҲ¾Í»áÔ½¿ì¡£Òò´Ë£¬ÔÚ´´½¨±íµÄʱºò£¬ÎªÁË»ñµÃ¸üºÃµÄÐÔÄÜ£¬ÎÒÃÇ¿ÉÒÔ½«
±íÖÐ×ֶεĿí¶ÈÉèµÃ¾¡¿ÉÄÜС¡£ÀýÈ磬ÔÚ¶¨ÒåÓÊÕþ±àÂëÕâ¸ö×Ö¶Îʱ£¬Èç¹û½«ÆäÉèÖÃΪCHAR(255),ÏÔÈ»¸øÊý¾Ý¿âÔö¼ÓÁ˲»±ØÒªµÄ¿Õ¼ä£¬É ......

MySQL Cluster Overview


MySQL Cluster
is a technology that enables
clustering of in-memory databases in a shared-nothing system. The
shared-nothing architecture allows the system to work with very
inexpensive hardware, and with a minimum of specific requirements
for hardware or software.

......

MySQL Cluster Core Concepts


NDBCLUSTER
(also known as NDB
) is an in-memory
storage engine offering high-availability and data-persistence
features.

The NDBCLUSTER
storage engine can be
configured with a range of failover and load-balancing options,
but it is easiest t ......

mysql °¢À­²®Êý×Öת»»ÖÐÎĺ¯Êý

CREATE DEFINER=`root`@`%` FUNCTION `sp_cn`(n_LowerMoney  decimal(15,2)) RETURNS varchar(200) CHARSET utf8
begin
Declare v_LowerStr  VARCHAR(200) ;
Declare v_UpperPart VARCHAR(200) ;
Declare v_UpperStr VARCHAR(200) ;
Declare i_I int ;
set v_LowerStr = LTRIM(RTRIM(ROUND(n_LowerMoney,2 ......

Can't connect to MySQL server on '' (10060)

Ô¶³ÌÁ¬½Ó·þÎñÆ÷³öÏÖÒÔÉÏ´íÎó
Ö÷ÒªÓÐÈý¸öÔ­Òò£º
1¡¢mysqlÊÚȨ±íÀïûÓÐÔ¶³Ì»úÆ÷µÄȨÏÞ£¬¼°ÐèÒªÔÚÊÚȨ±ímysql.userÌí¼Ó
grant all privileges on *.* to 'root'@'Ô¶³ÌµÇ½IP' identified by 'Ô¶³ÌµÇ½ÃÜÂë'
flush privileges;
2¡¢ÍøÂ粻ͨ£¬Õâ¸ö¾Í²»ËµÁË¡£
3¡¢·À»ðǽ½ûÖ¹3306¶Ë¿Ú£¬ÒÔiptableΪÀý
vi /etc/sysconfig/ipt ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ