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

mysql×Ö·û¼¯Ð£Ñé¹æÔò

                                                                       mysql×Ö·û¼¯Ð£Ñé¹æÔò 
    mysql ²»Í¬ÓÚÆäËûÊý¾Ý¿â£¨Èçoracle£©£¬Ëü¿ÉÒÔÔÚ¶à¸ö¼¶±ðÉèÖÃ×Ö·û¼¯ºÍУÑé¹æÔò£¬Èçserver¼¶±ð¡¢database¼¶±ð¡¢table¼¶±ðºÍcolumn¼¶±ð¡£Êµ¼ÊÉÏ£¬ÎÒÃÇÉõÖÁ»¹¿ÉÒÔµ¥¶À¶ÔÒ»´®×Ö·û´®É趨Æä×Ö·û¼¯ºÍУÑé¹æÔò£¬»¹¿ÉÒÔÔÚÁ¬½ÓÖÐÉèÖÃÆä×Ö·û¼¯ºÍУÑé¹æÔò£¬ÏÂÃæÀ´¼òµ¥µÄÌÖÂÛÏÂÇ°4ÖÖ¼¶±ðµÄ×Ö·û¼¯ºÍУÑé¹æÔòµÄÉèÖá£
server
    ÔÚÆô¶¯mysql·þÎñµÄʱºò£¬¿ÉÒÔÖ¸¶¨mysql serverµÄ×Ö·û¼¯ºÍУÑé¹æÔò£¬Í¨¹ýÈçÏ·½Ê½£º
mysqld --character-set-server=latin1 --collation-server=latin1_swedish_ci
    Èç¹û²»Ç××ÔÖ¸¶¨ËüÃÇ£¬ÄÇômysql¾Í»áʹÓÃĬÈÏÖµ¡£Ò»°ãÊÇlatin1ºÍlatin1_swedish_ci¡£µ±È»Õâ¸öĬÈÏÖµÊÇ¿ÉÒÔÐ޸ĵģ¬µ«ÊÇ·½·¨Ö»ÓÐÒ»ÖÖ£¬ÄǾÍÊÇÖرàÒëÔ´´úÂë¡£²ÉÓÃÈçÏ·½Ê½£º
./configure --with-charset=gbk  --with-collation=gbk_bin
    ÈçºÎ²éѯµ±Ç°µÄserverµÄ×Ö·û¼¯ºÍУÑé¹æÔòµÄÖµ£¬¿ÉÒԲ鿴ϵͳ²ÎÊýcharacter_set_serverºÍcollation_server£º
mysql> show variables like 'character_set_server%';
+----------------------+--------+
| Variable_name        | Value  |
+----------------------+--------+
| character_set_server | latin1 |
+----------------------+--------+
1 row in set (0.00 sec)
mysql> show variables like 'collation_server%';
+------------------+-------------------+
| Variable_name    | Value             |
+------------------+-------------------+
| collation_server | latin1_swedish_ci |
+------------------+-------------------+
1 row in set (0.00 sec)
   
    serverµÄ×Ö


Ïà¹ØÎĵµ£º

mySQLÑÓ³Ù

 ÔÚÖ÷Íâ¼ü±í´æÔÚ¹ØϵµÄʱºòÈç¹û¼ÓÉÏ"lazy=true"µÄ»°£¬Ôò±íÃ÷ÑÓ³Ù£¬¼´Ö»²éѯÖ÷±íÖеÄÄÚÈÝ£¬¶ø²»²éѯÍâ¼ü±íÖеÄÄÚÈÝ¡£
Àý£º
<hibernate-mapping>
    <class name="com.pojo.Sortp" table="sortp" catalog="shjdc">
        <id name="id" type= ......

mysql ³£ÓÃÃüÁî

MySQL ÃüÁîÐÐ
µÚÒ»ÕС¢mysql·þÎñµÄÆô¶¯ºÍÍ£Ö¹
net stop mysql
net start mysql
µÚ¶þÕС¢µÇ½mysql
Óï·¨ÈçÏ£º mysql -uÓû§Ãû -pÓû§ÃÜÂë
¼üÈëÃüÁîmysql -uroot -p£¬ »Ø³µºóÌáʾÄãÊäÈëÃÜÂ룬ÊäÈë12345£¬È»ºó»Ø³µ¼´¿É½øÈëµ½mysqlÖÐÁË£¬mysqlµÄÌáʾ·ûÊÇ£º
mysql>
×¢Ò⣬Èç¹ûÊÇÁ¬½Óµ½ÁíÍâµÄ»úÆ÷ÉÏ£¬ÔòÐèÒª¼ÓÈëÒ»¸ö² ......

mysql connect by c++

#include <stdio.h>
#include <windows.h>
#include <mysql.h>
#define host "localhost"
#define username "root"
#define password "123"
#define database "oa"
MYSQL *conn;
int main()
{
MYSQL_RES *res_set;
MYSQL_ROW row;
unsigned int i,ret;
FILE *fp;
MYSQL_FIELD *field; ......

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ºÅ