C#Á¬½ÓMySqlÊý¾Ý¿â·½·¨
ÓîÀ¼
1¡¢ÓÃMySQLDriverCSÁ¬½ÓMySQLÊý¾Ý¿â
ÏÈÏÂÔغͰ²×°MySQLDriverCS£¬µØÖ·£ºhttp://sourceforge.net/projects/mysqldrivercs/ÔÚ°²×°Îļþ¼ÐÏÂÃæÕÒµ½MySQLDriver.dll£¬È»ºó½«MySQLDriver.dllÌí¼ÓÒýÓõ½ÏîÄ¿ÖÐ×¢£ºÎÒÏÂÔصÄÊÇ°æ±¾ÊÇ MySQLDriverCS-n-EasyQueryTools-4.0.1-DotNet2.0.exe using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Data.Odbc;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using MySQLDriverCS; namespace mysql{ public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { MySQLConnection conn = null; conn = new MySQLConnection(new MySQLConnectionString("localhost", "inv", "root", "831025").AsString); conn.Open(); MySQLCommand commn = new MySQLCommand("set names gb2312", conn); commn.ExecuteNonQuery(); string sql = "select * from exchange "; MySQLDataAdapter mda = new MySQLDataAdapter(sql, conn); DataSet ds = new DataSet(); mda.Fill(ds, "table1"); &n
Ïà¹ØÎĵµ£º
ÔÚÊý¾Ý¿âÓ¦Óã¬ÎÒÃǾ³£ÒªÓõ½Î¨Ò»±àºÅ¡£ÔÚMySQLÖпÉͨ¹ý×ֶεÄAUTO_INCREMENTÊôÐÔÀ´×Ô¶¯Éú³É¡£MySQLÖ§³Ö¶àÖÖÊý¾Ý±í£¬Ã¿ÖÖÊý¾Ý±íµÄ×ÔÔöÊôÐÔ¶¼ÓÐËù²»Í¬¡£
ISAM±í
Èç¹û°ÑÒ»¸öNULL²åÈëµ½Ò»¸öAUTO_INCREMENTÊý¾ÝÁÐÀïÈ¥£¬MySQL½«×Ô¶¯Éú³ÉÏÂÒ»¸öÐòÁбàºÅ¡£±àºÅ´Ó1¿ªÊ¼£¬²¢1Ϊ»ùÊýµÝÔö¡£
µ±²åÈë¼Ç¼ʱ£¬Ã»ÓÐΪAUTO_INCREMENTÃ÷È ......
2007-11-16 15:37
½ñÌì¿´×ÅÊÖ²áÊÔÁËÏ£¬·¢ÏÖÔÀ´´óÊý¾Ýµ¼Èëµ¼³öÊÇÄÇôµÄÇáËÉ£¨²»ÊǺܴó£¬200¶àMµÄÎı¾¶øÒÔ£©
×¢Ò⣺Èç¹û·¢ÏÖMYSQL unknown command '\'ÕâÑùµÄÌáʾ£¬ÔòÉèÖÃһϷþÎñÆ÷µÄ×Ö·û¼¯£¬È磺
mysql -uroot -ppasspass --default-character-set=utf8 databaseName <d:bakcup.sql
ÕâÑù¾Í²»»á±¨´íÁË£¬^_^
µ¼³ö ......
¶ÔÓÚÿ¸öÀàÐÍÓµÓеÄÖµ·¶Î§ÒÔ¼°²¢ÇÒÖ¸¶¨ÈÕÆÚºÎʱ¼äÖµµÄÓÐЧ¸ñʽµÄÃèÊö¼û7.3.6 ÈÕÆÚºÍʱ¼äÀàÐÍ¡£
ÕâÀïÊÇÒ»¸öʹÓÃÈÕÆÚº¯ÊýµÄÀý×Ó¡£ÏÂÃæµÄ²éѯѡÔñÁËËùÓмǼ£¬Æädate_colµÄÖµÊÇÔÚ×îºó30ÌìÒÔÄÚ£º
mysql> SELECT something from table
WHERE TO_DAYS(NOW()) - TO_DAYS(date_col) select DAYOFWEEK('1998-02-03');
-&g ......
2009-05-05
´ò¿ªMySQLÔ¶³Ì·ÃÎÊȨÏÞ
¹Ø¼ü×Ö: mysql
1¡¢¸Ä±í·¨
¡¡¡¡¿ÉÄÜÊÇÄãµÄÕʺŲ»ÔÊÐí´ÓÔ¶³ÌµÇ½£¬Ö»ÄÜÔÚlocalhost¡£Õâ¸öʱºòÖ»ÒªÔÚlocalhostµÄÄÇ̨µçÄÔ£¬µÇÈëmysqlºó£¬¸ü¸Ä "mysql" Êý¾Ý¿âÀïµÄ "user" ±íÀïµÄ "host" Ï´Ó"localhost"¸Ä³Æ"%"
¡¡¡¡mysql -u root -p
mysql>use mysql;
¡¡¡¡mysql>upda ......
mysql
ÃüÁ½õ
²âÊÔ»·¾³£ºmysql 5.0.45
¡¾×¢£º¿ÉÒÔÔÚmysql
ÖÐͨ¹ýmysql>
SELECT VERSION();
À´²é¿´Êý¾Ý¿â°æ±¾¡¿
Ò»¡¢Á¬½ÓMYSQL
¡£
¸ñʽ£º mysql -h
Ö÷»úµØÖ· -u
̞
£p
Óû§ÃÜÂë
1
¡¢Á¬½Óµ½±¾»úÉϵÄMYSQL
¡£
Ê×ÏÈ´ò¿ªDOS
´°¿Ú£¬È»ºó½øÈëĿ¼mysql\bin
£¬ÔÙ¼üÈëÃüÁîmysql -u r ......