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

ÀûÓÃMySQLDriverCSʵÏÖÔÚ.NET»·¾³Ï·ÃÎÊMySQLÊý¾Ý¿â

using System;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using MySQLDriverCS;
 
public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        MySQLConnection conn = null;
        conn = new MySQLConnection(new MySQLConnectionString("127.0.0.1", "Dvbbs", "root", "123456").AsString);
        conn.Open();
        MySQLCommand commn = new MySQLCommand("set names gb2312",conn);
        commn.ExecuteNonQuery();
        string sql = "select title,topicID, boardId ,dateandtime,hits  from  Dv_topic order by dateandtime desc limit 10";
        MySQLDataAdapter mda = new MySQLDataAdapter(sql,conn);
        DataSet ds = new DataSet();
        mda.Fill(ds, "table1");
        this.Repeater1.DataSource = ds;
        this.Repeater1.DataBind();
        conn.Close();
    }
}
¾ÍÕâÑù¾Í¿ÉÒÔʵÏÖÔÚ.NET»·¾³Ï¶ÔMySQLÊý¾ÝµÄ·ÃÎÊ¡£ÔÚÕâ֮ǰ»¹Òª×öһЩ׼±¸£¬ÏÂÔØMySQLDriverCS£¬°²×°£¬ÔÚ°²×°Îļþ¼ÐÏÂÃæÕÒµ½MySQLDriver.dll£¬È»ºó½«MySQLDriver.dllÌí¼ÓÒýÓõ½ÏîÄ¿ÖоÍOKÁË¡£Ò²ÐíÄã¶ÔÕâÐдúÂë
MySQLCommand commn = new MySQLCommand("set names gb2312",conn);
        commn.ExecuteNonQuery();
²»Ì«Àí½â¡£ÕâÊÇÒòΪÈç¹ûûÓÐÕâ¾ä»


Ïà¹ØÎĵµ£º

ÈçºÎÐÞ¸ÄMYSQLÊý¾Ý¿âÀïµÄÓû§ÃûÃÜÂë

windows2003----¿ªÊ¼----ÔËÐÐ---mysql -uroot -p£¬½øÈëMYSQLÊý¾Ý¿â£¬ÊäÈëÃÜÂ룬µÇ½¡£
show databases;¿´¿´ÓÐÄÄЩÊý¾Ý¿â
use xxxxxx£»(xxxxxxΪÊý¾Ý¿âÃû£¬½øÈëÊý¾Ý¿â)
update user set passwd=MD5('111111*') where user_name = 'admin';£¨111111ΪҪÐ޸ĵÄÃÜÂ룩 ......

MYSQLÓÅ»¯ÅäÖÃ

MySQLÅäÖÃÎļþ
MySQL·¢²¼µÄ×îвúƷʵ¼ÊÉϳ¬³öÁËLinuxËùЯ´øµÄ°æ±¾¡£µ«ÊÇ£¬Îȶ¨ÐԺͿª·ÅÔ´´úÂë¿ÉÊǺÜÖØÒªµÄÒòËØ£¬Òò´ËÔÚ²Ù×÷ϵͳÉÏʹÓýÏÔçMySQL°æ±¾ÊÇÓеÀÀíµÄ¡£
ÓÐÐí¶à¿ÉÒÔ²ÉÓõÄÅäÖÃÎļþ£¬ËüÃǶ¼±»°üº¬ÔÚmysql-server PRM³ÌÐòÖС£»¹ÓÐÒ»¸öĬÈϵÄÅäÖÃÎļþ±»°üº¬ÔÚmysql PRM³ÌÐò°üÖС£
ÅäÖÃMySQL·þÎñÆ÷ÊÇÒ»¸ö·á¸»¶ø¸´ÔÓ ......

°²×°¡¢ÉèÖÃÓëÆô¶¯MySqlÂÌÉ«°æµÄ·½·¨

1¡¢½âѹ mysql-noinstall-5.1.30-win32.zip
2¡¢ÔÚ F Å̽¨Á¢Ä¿Â¼ MySql\MySqlServer5.1\
3¡¢°Ñ½âѹµÄÄÚÈݸ´ÖƵ½  F:\MySql\MySqlServer5.1\
4¡¢ÔÚ F:\MySql\MySqlServer5.1\ ÖÐÕÒ my-large.ini °ÑËü¸´ÖÆ³É my.ini
5¡¢ÔÚ my.ini ÖÐÕÒ [mysqld] £¬Ìí¼ÓÒÔÏÂÓï¾ä;
basedir="F:/MySql/MySqlServer5.1/"
datadir="F:/My ......

MysqlÖÐÈçºÎÅúÁ¿Éú³É½Å±¾


[root@sql21 ~]# mysql -u root
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 3 to server version: 5.1.26-rc-log
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> show databases;
+--------------------+
| Database  &nb ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ