.NETÁ¬½ÓMySqlÊý¾Ý¿âµÄ·½·¨¼°Ê¾Àý
·½·¨Ò»£º
ʹÓÃMySQLÍƳöµÄMySQL Connector/Net×é¼þ£¬ ¸Ã×é¼þÊÇMySQLΪADO.NET·ÃÎÊMySQLÊý¾Ý¿âÉè¼ÆµÄ.NETרÓ÷ÃÎÊ×é¼þ¡£Íê³É¸Ã×é¼þºó£¬ÐèÒªÔÚÏîÄ¿ÖÐÒýÓÃÕâ¸ö×é¼þ£¬Ò²¿ÉÒÔÖ±½ÓÔÚÅäÖÃÎļþµÄ<assemblies>½ÚµãÄÚÌí¼ÓÏÂÃæµÄ½Úµã£º
<add assembly="MySql.Data, Version=5.1.5.0, Culture=neutral, PublicKeyToken=C5687FC88969C44D"/>
Ö®ºóÔÚ³ÌÐòÖÐÒýÓÃÃüÃû¿Õ¼äMySql.Data.MySqlClient£¬¼´¿É¿ªÊ¼½øÐÐÁ¬½ÓMySQLÊý¾Ý¿âµÄ²Ù×÷ÁË£¬Ê¾ÀýÈçÏ£º
1protected void MySqlCon()
2{
3 //Êý¾Ý¿âÁ¬½Ó×Ö·û´®¸úÁ¬½ÓSQL SERVERûÓÐÇø±ð
4 string constr = "server=localhost;User Id=root;password=root;Database=test";
5
6 //ÏÂÃæʹÓÃMySql Connector/netÌṩµÄרÓöÔÏó
7 MySqlConnection mycon = new MySqlConnection(constr);
8 mycon.Open();
9 MySqlCommand mycmd = new MySqlCommand("select * from users", mycon);
10 MySqlDataReader myreader = mycmd.ExecuteReader();
11 while (myreader.Read())
12 {
13 if (myreader.HasRows)
14 {
15 Response.Write(myreader.GetString("email") + "<br/>");
16 }
17 }
18 myreader.Close();
19 mycon.Close();
20
21}
·½·¨¶þ£º
ʹÓÃODBC.NET¡£Ò»°ãÀ´Ëµ£¬ODBC.NETµÄDataProviderÊDZê×¼µÄ.NET¿ò¼Ü£¨1.1¼°ÒÔÉϵİ汾£©µÄÒ»²¿·Ö£¬ËùÒÔ»áºÍºóÕßÒ»Æð×Ô¶¯°²×°ºÃ¡£Ò
Ïà¹ØÎĵµ£º
2007-11-16 15:37
½ñÌì¿´×ÅÊÖ²áÊÔÁËÏ£¬·¢ÏÖÔÀ´´óÊý¾Ýµ¼Èëµ¼³öÊÇÄÇôµÄÇáËÉ£¨²»ÊǺܴó£¬200¶àMµÄÎı¾¶øÒÔ£©
×¢Ò⣺Èç¹û·¢ÏÖMYSQL unknown command '\'ÕâÑùµÄÌáʾ£¬ÔòÉèÖÃһϷþÎñÆ÷µÄ×Ö·û¼¯£¬È磺
mysql -uroot -ppasspass --default-character-set=utf8 databaseName <d:bakcup.sql
ÕâÑù¾Í²»»á±¨´íÁË£¬^_^
µ¼³ö ......
use mysql
update user set Password=password('newpassword') where User='root';
flush privileges;
Ê×ÏÈÒªÉùÃ÷Ò»µã£¬´ó²¿·ÖÇé¿öÏ£¬ÐÞ¸ÄMySQLÊÇÐèÒªÓÐmysqlÀïµÄrootȨÏ޵ģ¬
ËùÒÔÒ»°ãÓû§ÎÞ·¨¸ü¸ÄÃÜÂ룬³ý·ÇÇëÇó¹ÜÀíÔ±¡£
·½·¨Ò»
ʹÓÃphpmyadmin£¬ÕâÊÇ×î¼òµ¥µÄÁË£¬ÐÞ¸Ämysql¿âµ ......
×÷Õߣºandyao
ÔÎÄlink: http://andyao.javaeye.com/admin/show/144033
תÔØÇëÁôÃû
1. ¼ò½é
ÔÚWebÓ¦ÓóÌÐòÌåϵ¼Ü¹¹ÖУ¬Êý¾Ý³Ö¾Ã²ã£¨Í¨³£ÊÇÒ»¸ö¹ØϵÊý¾Ý¿â£©ÊǹؼüµÄºËÐIJ¿·Ö£¬Ëü¶ÔϵͳµÄÐÔÄÜÓзdz£ÖØÒªµÄÓ°Ïì¡£MySQLÊÇĿǰʹÓÃ×î¶àµÄ¿ªÔ´Êý¾Ý¿â£¬µ«ÊÇMySQLÊý¾Ý¿âµÄĬÈÏÉèÖÃÐÔÄܷdz£µÄ²î£¬½ö½öÊÇÒ»¸öÍæ¾ßÊý¾Ý¿â¡£Òò´ËÔÚ ......
LinuxϽøÐÐMYSQLµÄC++±à³ÌÆð²½ÊÖ¼Ç
Ê×ÏÈ°²×°±ØÐèµÄ¿ª·¢°ü
sudo apt-get install gcc g++ libgcc1 libg++ make gdb
°²×°MYSQLµÄCÓïÑÔ¿ª·¢°ü
sudo apt-get install libmysql++-dev libmysql++2c2a libmysqlclient15-dev libmysqlclient15off
......
ÎÒͬѧ½ÓÁ˸ö˽»î£¬ÏòÎÒÒªÁËmysqlµÄ°²×°Îļþ¡£×òÍíËûÎÊÎÒÓÐûÓöµ½mysqlµÄÂÒÂëÎÊÌ⣬ÎÒ¸øËûµÄ´ð°¸ÊǵÚÒ»´ÎÓõÄʱºòÓöµ½¹ý£¬ÅäºÃÁ˺ó£¬ÏÖÔÚ¶¼Ã»ÓÐÁË¡£Ëû˵ÔÚÍøÉÏÕÒÁ˺ܶàÎÄÕ£¬ÕÕןÄÁËËùÓÐÅäÖÃÎļþ¶¼Ã»½â¾ö¡£
ÏëÏëÒ²ÊÇ£¬µ±³õµÚÒ»´ÎÓõÄʱºòÒ²ÊÇÒ»Ñù£¬¸ÄÁËËù ......