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

C#.NETÁ¬½Ómysql·½·¨


 mysql.data.dll¿½±´µ½binÏÂÃæ²¢ÒýÓÃÒ»ÏÂ
using MySql.Data.MySqlClient;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
string myConnectionString = "Database=test;Data Source=localhost;User Id=root;Password=admin";
MySqlConnection mycn = new MySqlConnection(myConnectionString);

try
{
mycn.Open();
Response.Write("<mce:script type="text/javascript"><!--
alert('Á¬½Ó³É¹¦')
// --></mce:script>");
}
catch (Exception ex)
{
Response.Write("<mce:script type="text/javascript"><!--
alert(" ex.ToString() ")
// --></mce:script>");
}
}
}
Ò²¿ÉÒÔÅäÖÃapp.config (web.config):
<appSettings>
<add key="Con" value="Provider=MySQLProv;Data Source=test;User Id=root;Password=admin;pooling=false;CharSet=utf8;port=3306"/>
</appSettings>


Ïà¹ØÎĵµ£º

mysql´ò¿ªÂý²éѯÈÕÖ¾

±à¼­my.cnfÎļþ£¬¼ÓÈ룺
log-slow-queries[=file]    #ĬÈÏΪdataĿ¼ÏµÄhostname-slow.logÎļþ
long_query_time=10   (seconds)   #Âý²éѯµÄthreshold
log-queries-not-using-indexes   #¼Ç¼²»Ê¹ÓÃË÷ÒýµÄ²éѯ
mysqldumpslowÃüÁî»ñµÃÈÕÖ¾ÖÐÏÔʾµÄ²éѯժҪÀ´´¦ÀíÂý²éÑ¯È ......

C# sql ʵÏÖͼƬÅúÁ¿´¢´æ¶ÁÈ¡

 winformÏ£º
         //´æ´¢
        private void MemoryImage()
        {
            string sql = "";
   &nbs ......

php+mysqlÖеÄһЩÓï¾ä

mysql½¨Á¢Ò»¸ö±í¸ñ£º
create table hyhtbsc(
id int(4) primary key auto_increment,
username varchar(20),
password varchar(20)
);
²éѯÊý¾Ý¿âÄÚÈÝ£º
<?php
$conn = mysql_connect("localhost","root","pass");
mysql_select_db("mydb",$conn);
$sql = "select * from mytable";
$result = mysql_query($ ......

mysqlÃüÁî´óÈ«

Æô¶¯£ºnet start mySql;
¡¡¡¡½øÈ룺mysql -u root -p/mysql -h localhost -u root -p databaseName;
¡¡¡¡ÁгöÊý¾Ý¿â£ºshow databases;
¡¡¡¡Ñ¡ÔñÊý¾Ý¿â£ºuse databaseName;
¡¡¡¡Áгö±í¸ñ£ºshow tables£»
¡¡¡¡ÏÔʾ±í¸ñÁеÄÊôÐÔ£ºshow columns from tableName£»
¡¡¡¡½¨Á¢Êý¾Ý¿â£ºsource fileName.txt;
¡¡¡¡Æ¥Åä× ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ