mysql×Ö·û¼¯²é¿´ÒÔ¼°ÐÞ¸Ä
ת×Ô:http://blog.chinaunix.net/u2/85344/showart_2042280.html
LiunxÏÂÐÞ¸ÄMySQL×Ö·û¼¯£º
1.²éÕÒMySQLµÄcnfÎļþµÄλÖÃ
find / -iname '*.cnf' -print
/usr/share/mysql/my-innodb-heavy-4G.cnf
/usr/share/mysql/my-large.cnf
/usr/share/mysql/my-small.cnf
/usr/share/mysql/my-medium.cnf
/usr/share/mysql/my-huge.cnf
/usr/share/texmf/web2c/texmf.cnf
/usr/share/texmf/web2c/mktex.cnf
/usr/share/texmf/web2c/fmtutil.cnf
/usr/share/texmf/tex/xmltex/xmltexfmtutil.cnf
/usr/share/texmf/tex/jadetex/jadefmtutil.cnf
/usr/share/doc/MySQL-server-community-5.1.22/my-innodb-heavy-4G.cnf
/usr/share/doc/MySQL-server-community-5.1.22/my-large.cnf
/usr/share/doc/MySQL-server-community-5.1.22/my-small.cnf
/usr/share/doc/MySQL-server-community-5.1.22/my-medium.cnf
/usr/share/doc/MySQL-server-community-5.1.22/my-huge.cnf
2. ¿½±´ small.cnf¡¢my-medium.cnf¡¢my-huge.cnf¡¢my-innodb-heavy-4G.cnfÆäÖеÄÒ»¸öµ½/etcÏ£¬ÃüÃûΪmy.cnf
cp /usr/share/mysql/my-medium.cnf /etc/my.cnf
3. ÐÞ¸Ämy.cnf
vi /etc/my.cnf
ÔÚ[client]ÏÂÌí¼Ó
default-character-set=utf8
ÔÚ[mysqld]ÏÂÌí¼Ó
default-character-set=utf8
4.ÖØÐÂÆô¶¯MySQL
[root@bogon ~]# /etc/rc.d/init.d/mysql restart
Shutting down MySQL [ È·¶¨ ]
Starting MySQL. [ È·¶¨ ]
[root@bogon ~]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.1.22-rc-community-log MySQL Community Edition (GPL)
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
5.²é¿´×Ö·û¼¯ÉèÖÃ
mysq
Ïà¹ØÎĵµ£º
MySQLÓкܶà¿ÉÒÔµ¼ÈëÊý¾ÝµÄ·½·¨£¬È»¶øÕâЩֻÊÇÊý¾Ý´«ÊäÖеÄÒ»°ë£¬ÁíÍâµÄÒ»°ãÊÇ´ÓMySQLÊý¾Ý¿âÖе¼³öÊý¾Ý¡£ÓÐÐí¶àµÄÔÒòÎÒÃÇÐèÒªµ¼³öÊý¾Ý¡£Ò»¸öÖØ
ÒªµÄÔÒòÊÇÓÃÓÚ±¸·ÝÊý¾Ý¿â¡£Êý¾ÝµÄÔì¼Û³£³£Êǰº¹óµÄ£¬ÐèÒª½÷É÷´¦ÀíËüÃÇ¡£¾³£µØ±¸·Ý¿ÉÒÔ°ïÖú·ÀÖ¹±¦¹óÊý¾ÝµØ¶ªÊ§£»ÁíÍâÒ»¸öÔÒòÊÇ£¬Ò²ÐíÄúÏ£Íûµ¼³öÊý¾ÝÀ´¹²
Ïí¡£ ÔÚÕâ¸öÐÅÏ¢¼¼Ê ......
MySQLÅäÖÃÎļþ
MySQL·¢²¼µÄ×îвúƷʵ¼ÊÉϳ¬³öÁËLinuxËùЯ´øµÄ°æ±¾¡£µ«ÊÇ£¬Îȶ¨ÐԺͿª·ÅÔ´´úÂë¿ÉÊǺÜÖØÒªµÄÒòËØ£¬Òò´ËÔÚ²Ù×÷ϵͳÉÏʹÓýÏÔçMySQL°æ±¾ÊÇÓеÀÀíµÄ¡£
ÓÐÐí¶à¿ÉÒÔ²ÉÓõÄÅäÖÃÎļþ£¬ËüÃǶ¼±»°üº¬ÔÚmysql-server PRM³ÌÐòÖС£»¹ÓÐÒ»¸öĬÈϵÄÅäÖÃÎļþ±»°üº¬ÔÚmysql PRM³ÌÐò°üÖС£
ÅäÖÃMySQL·þÎñÆ÷ÊÇÒ»¸ö·á¸»¶ø¸´ÔÓ ......
²ÉÓõÄÊÇMySql¹Ù·½ÌṩµÄ.NET connector£¬´ËÇý¶¯Ö»ÐèÒªÏÂÔØ¼´¿ÉʹÓãºhttp://dev.mysql.com/downloads/connector/net/1.0.html
ÔÚʹÓÃÖлýÀÛÁ˼¸µã¾Ñ飺
1)ʹÓÃParameter²ÎÊýÐÎʽÌá½»Commandʱ±ØÐëÒª°Ñ"@"ºÅ»»³É"?"ºÅ£¬ÕâÒ»µãÈÃÎÒÀ§»óÁËÒ»Ì죬ֻÊDz»Ã÷°×MySQLΪºÎÒª¸ãÌØÊâÄØ£¬ÏóMS¡¢ODP.NE ......
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;
&nb ......
ÏÂÃæÊÇcommond:
MySQLCommand cmd;
cmd = new MySQLDriverCS.MySQLCommand("DROP TABLE IF EXISTS test.mysqldrivercs_test",conn);
cmd.ExecuteNonQuery();
cmd.Dispose();
ÏÂÃæÊÇinsert:
string Value = "Value";
int SettingID = 1;
new MySQLInsertCommand(conn,
new object[,] {{"SettingID",SettingID},{"S ......