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

Á˽âMySQlÊý¾Ý¿âĿ¼

Êý¾Ý¿âĿ¼ÊÇMySQLÊý¾Ý¿â·þÎñÆ÷´æ·ÅÊý¾ÝÎļþµÄµØ·½£¬²»½ö°üÀ¨ÓйرíµÄÎļþ£¬»¹°üÀ¨Êý¾ÝÎļþºÍMySQLµÄ·þÎñÆ÷Ñ¡ÏîÎļþ¡£²»Í¬µÄ·Ö·¢£¬Êý¾Ý¿âĿ¼µÄȱʡλÖÃÊDz»Í¬µÄ¡£
Êý¾ÝĿ¼µÄλÖÃ
ȱʡµÄÊý¾Ý¿âλÖÃ
ȱʡÊý¾Ý¿âµÄλÖñàÒëÔÚ·þÎñÆ÷ÖС£
¡ôÈç¹ûÄúÊÇÔÚÒ»¸öÔ´³ÌÐò·Ö·¢°üÖа²×° MySQL£¬µäÐ͵ÄȱʡλÖÿÉÄÜÊÇ /usr/local/var£»
¡ôÈç¹ûÔÚ¶þ½øÖÆ·Ö·¢°üÖа²×° MySQL£¬ÔòΪ /usr/local/mysql/ data£»
¡ôÔÚ RPM ÎļþÖа²×°£¬Îª /var/lib/mysql¡£
¡ô¶ÔÓÚwindwosƽ̨Éϵķַ¢£¬ÆäλÖÃʱBASEDIR\data
Êý¾ÝĿ¼µÄλÖÿÉÒÔÔÚÆô¶¯·þÎñÆ÷ʱͨ¹ý--datadir = / path / to / dir Ã÷È·µØÖ¸¶¨¡£Èç¹ûÄúÏ뽫Êý¾ÝĿ¼·ÅÖÃÔÚÆäËûµØ·½¶ø·ÇȱʡµÄλÖã¬ÔòÕâ¸öÑ¡ÏîÊÇÓÐÓõġ£
Á˽âÊý¾Ý¿âĿ¼µÄλÖÃ
×÷ΪһÃû MySQL ¹ÜÀíÔ±£¬ÄúÓ¦¸ÃÖªµÀÊý¾ÝĿ¼ÔÚÄÄÀï¡£Èç¹ûÔËÐжà¸ö·þÎñÆ÷£¬ÄÇôÄúÓ¦¸ÃÕÆÎÕËùÓÐÊý¾ÝĿ¼µÄλÖᣵ«ÊÇ£¬Èç¹û²»ÖªµÀĿ¼µÄλÖ㨻òÐíÄúÕýÔÚ´úÌæǰһλ¹ÜÀíÔ±£¬¶øËûÁôϵļǼºÜÔã¸â£©£¬Óм¸ÖÖ·½·¨¿ÉÒÔÓÃÀ´²éÕÒËü£º
1¡¢¿ÉʹÓà mysqladmin ±äÁ¿Ö±½Ó´Ó·þÎñÆ÷Öеõ½Êý¾ÝĿ¼·¾¶Ãû¡£ÔÚ UNIX ÖУ¬Êä³ö½á¹ûÀàËÆÓÚÈçÏÂËùʾ£º
$mysqladmin variables
+-------------------------+---------------------------
| Variable_name           | Value                   
+-------------------------+---------------------------
| ansi_mode               | OFF                     
| back_log                | 50                      
| basedir                 | /var/local        
| connect_timeout         | 5   &


Ïà¹ØÎĵµ£º

MySqlÖеÄTimestampÀàÐÍ×ֶεÄʹÓÃ

TIMESTAMPÁÐÀàÐÍÌṩһÖÖÀàÐÍ£¬Äã¿ÉÒÔʹÓÃËü×Ô¶¯µØÓõ±Ç°µÄÈÕÆÚºÍʱ¼ä±ê¼ÇINSERT»òUPDATEµÄ²Ù×÷¡£Èç¹ûÄãÓжà¸öTIMESTAMPÁУ¬Ö»ÓеÚÒ»¸ö×Ô¶¯¸üС£
  ×Ô¶¯¸üеÚÒ»¸öTIMESTAMPÁÐÔÚÏÂÁÐÈκÎÌõ¼þÏ·¢Éú£º
ÁÐûÓÐÃ÷È·µØÔÚÒ»¸öINSERT»òLOAD   DATA   INFILEÓï¾äÖÐÖ¸¶¨¡£     
ÁÐûÓÐÃ÷È·µØÔÚÒ ......

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 ......

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 ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ