Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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ÒýÇæ

×òÌìºÍͬѧÏÐÁÄʱ,̸µ½ÁËÊý¾Ý¿âµÄÒýÇæÊÇʲô,½ñÌìÔÚÍøÉÏËÑË÷Á˺ܾÃ,ҲûÓз¢ÏֱȽÏÈ«ÃæµÄ˵Ã÷¸÷¸öÊý¾Ý¿âµÄËÑË÷ÒýÇæ·½ÃæµÄ.
MySQLÒýÇæÊÇʲô,
MySQLÊÇÎÒÃDZȽϳ£ÓõÄÒ»ÖÖÊý¾Ý¿âÈí¼þ¡£ËüÓÐ×ÅÖî¶àµÄÓŵ㣬È翪ԴµÄ£¬Ãâ·ÑµÄµÈµÈ¡£ÆäʵËü»¹ÓÐÒ»¸öºÜºÃµÄÌص㣬ÄǾÍÊÇÓжàÖÖÒýÇæ¿ÉÒÔ¹©ÄãÑ¡Ôñ¡£Èç¹ûÈü³µÊÖÄܸù¾Ý²»Í¬µÄ·¿ö£¬µØÐÎ ......

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

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

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;
¡¡¡¡Æ¥Åä× ......

Mysql Âý²éѯÆôÓÃ

 MySQLÂý²éѯ¼Ç¼ÈÕÖ¾¶ÔÓÚ¸ú×ÙMySQL¸ºÔص÷ÓÅÎÊÌâºÜÓÐÓô¦£¬ÆäʵÆôÓÃMySQLµÄÂý²éѯÈÕÖ¾ºÜ¼òµ¥,Ö»ÐèÒªÔÚMySQLµÄÅäÖÃÎļþÀïÌí¼Ólog-slow-queriesºÍlong_query_timeÁ½¸ö²ÎÊý¼´¿É¡£
WindowsÏ¿ªÆôMySQLÂý²éѯ
MySQLÔÚWindowsϵͳÖеÄÅäÖÃÎļþÒ»°ãÊÇÊÇmy.iniÕÒµ½[mysqld]ÏÂÃæ¼ÓÉÏ
log-slow-queries = F:\MySQL\log\mysqls ......

Weblogic 9.1µÄdomainÅäÖÃmysqlÁ¬½Ó³Ø

 
Weblogic 9.1µÄdomainÅäÖÃmysqlÁ¬½Ó³Ø
¡¡¡¡±¾ÎĽéÉÜÔÚweblogic 9.1ϵÄdomainÅäÖÃmysqlÁ¬½Ó³Ø²½Ö裺
¡¡¡¡1.ÔÚweblogicĿ¼ÏµÄserverlibÏÂÌí¼ÓmysqlÇý¶¯
¡¡¡¡mysql-connector-java-3.1.11-bin.jar
¡¡¡¡2.ÔÚweblogicĿ¼ÏµÄcommoninÏÂÕÒµ½commEnv.cmd´ò¿ª
¡¡¡¡ÕÒµ½set weblogic_classpath= ºó±ß¼ÓÉÏmysqlÇý¶¯ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ