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

mysqlѧϰ4

£­£­¶à±í²Ù×÷
   Ç°ÃæÎÒÃÇÊìϤÁËÊý¾Ý¿âºÍÊý¾Ý¿â±íµÄ»ù±¾²Ù×÷£¬ÏÖÔÚÎÒÃÇÔÙÀ´¿´¿´ÈçºÎ²Ù×÷¶à¸ö±í¡£
   ÔÚÒ»¸öÊý¾Ý¿âÖУ¬¿ÉÄÜ´æÔÚ¶à¸ö±í£¬ÕâЩ±í¶¼ÊÇÏ໥¹ØÁªµÄ¡£ÎÒÃǼÌÐøÊ¹ÓÃÇ°ÃæµÄÀý×Ó¡£Ç°Ã潨Á¢µÄ±íÖаüº¬ÁËÔ±¹¤µÄһЩ»ù±¾ÐÅÏ¢£¬ÈçÐÕÃû¡¢ÐԱ𡢳öÉúÈÕÆÚ¡¢³öÉúµØ¡£ÎÒÃÇÔÙ´´½¨Ò»¸ö±í£¬¸Ã±íÓÃÓÚÃèÊöÔ±¹¤Ëù·¢±íµÄÎÄÕ£¬ÄÚÈݰüÀ¨×÷ÕßÐÕÃû¡¢ÎÄÕ±êÌâ¡¢·¢±íÈÕÆÚ¡£
1¡¢²é¿´µÚÒ»¸ö±ímytableµÄÄÚÈÝ£º
mysql> select * from mytable;
+----------+------+------------+-----------+
| name    |   | birth    | birthaddr |
+----------+------+------------+-----------+
| abccs   |f    | 1977-07-07 | china    |
| mary    |f    | 1978-12-12 | usa     |
| tom    |m    | 1970-09-02 | usa     |
+----------+------+------------+-----------+
2¡¢´´½¨µÚ¶þ¸ö±ítitle£¨°üÀ¨×÷Õß¡¢ÎÄÕ±êÌâ¡¢·¢±íÈÕÆÚ£©:
mysql> create table title(writer varchar(20) not null,
   -> title varchar(40) not null,
   -> senddate date);
   Ïò¸Ã±íÖÐÌî¼Ó¼Ç¼£¬×îºó±íµÄÄÚÈÝÈçÏ£º
mysql> select * from title;
+--------+-------+------------+
| writer | title | senddate   |
+--------+-------+------------+
| abccs | a1   | 2000-01-23 |
| mary   | b1   | 1998-03-21 |
| abccs | a2   | 2000-12-04 |
| tom   | c1   | 1992-05-16 |
| tom   | c2   | 1999-12-12 |
+--------+-------+------------+
5 rows in set (0.00sec)
3¡¢¶à±í²éѯ
   ÏÖÔÚÎÒÃÇÓÐÁËÁ½¸ö±í: mytable ºÍ title¡£ÀûÓÃÕâÁ½¸ö±íÎÒÃÇ¿ÉÒÔ½øÐÐ×éºÏ²éѯ£º
ÀýÈçÎÒÃÇÒª²éѯ×÷ÕßabccsµÄÐÕÃû¡¢ÐÔ±ð¡¢ÎÄÕ£º
mysql> SELECT name,,title from mytable,title
   -> WHERE name=writer AND name='abccs';
+-------+------+-------+
| name |   | title |
+-------+------+-------+
| abccs | f   | a1   |


Ïà¹ØÎĵµ£º

mysql½ûÖ¹Ô¶³ÌrootµÇ½ (ת)

½â¾ö·½·¨£º
1¡£ ¸Ä±í·¨¡£¿ÉÄÜÊÇÄãµÄÕʺŲ»ÔÊÐí´ÓÔ¶³ÌµÇ½£¬Ö»ÄÜÔÚlocalhost¡£Õâ¸öʱºòÖ»ÒªÔÚlocalhostµÄÄÇ̨µçÄÔ£¬µÇÈëmysqlºó£¬¸ü¸Ä "mysql" Êý¾Ý¿âÀïµÄ "user" ±íÀïµÄ "host" Ï´Ó"localhost"¸Ä³Æ"%"
mysql -u root -pvmwaremysql>use mysql;
mysql>update ......

mysql ¹²ÏíËø ÅÅËûËø ·À²åÈëËø

ÊÔÑé1
ÊÂÎñ1£º
#!/usr/bin/python
import time
import MySQLdb;
conn = MySQLdb.connect(host="localhost",port=3306,user="root",passwd="asdf",db="test",unix_socket="/data/mysql_3306/mysql.sock")
cursor = conn.cursor()
cursor.execute("select * from test")
while str!="1":
    str = r ......

ʹÓÃxamppÎÞ·¨Æô¶¯apacheºÍmysqlµÄ½â¾ö·½·¨

±¾µØ°²×°WordPressʹÓÃxamppÎÞ·¨Æô¶¯apacheºÍmysqlµÄ½â¾ö·½·¨
½ñÌ쿪ʼװ±¾µØ²âÊÔÓõÄWordPress£¬Ñ¡Ôñxampp¼¯³É°ü¡£¿ÉÊǰ²×°¾Í³öÎÊÌâÁË¡£
apacheºÍMySQLÀϰ²×°Ê§°Ü£¬ºÜÊǾÀ½á···
°Ù¶ÈGoogleÁËÒ»ÍíÉÏÖÕÓÚµ·¹ÄºÃÁË¡£
ÏÂÃæÀ´ËµËµÎÒÊÇÔõô½â¾öµÄ£¬ºÍÌùÒ»·Ý¹ØÓÚÕâ¸öÎÊÌâµÄһƪÎÄÕ¡£
Ê×ÏȰ²×°Ä¿Â¼²»¿É ......

mysql »¥ÎªÖ÷´Ó


grant replication slave on *.* to backup@192.168.188.128 identified by "123456"; 
grant replication slave on *.* to backup@192.168.188.8 identified by "123456"; 
service mysql stop
server_id = 1
log-bin = mysql-bin
log-error=mysql-error
master-host = 192.168.188.8
master-user = ba ......

mysql ÌáÉýÃüÖÐÂÊ

Query Cache ÔÚÌá¸ßÊý¾Ý¿âÐÔÄÜ·½Ãæ¾ßÓзdz£ÖØÒªµÄ×÷Óá£
ÆäÉ趨Ҳ·Ç³£¼òµ¥£¬½öÐèÒªÔÚÅäÖÃÎļþдÈëÁ½ÐУº query_cache_type ºÍ query_cache _size£¬¶øÇÒ MySQL µÄ query cache ·Ç³£¿ì£¡¶øÇÒÒ»µ©ÃüÖУ¬¾ÍÖ±½Ó·¢Ë͸ø¿Í»§¶Ë£¬½ÚÔ¼´óÁ¿µÄ CPU ʱ¼ä¡£
µ±È»£¬·Ç SELECT Óï¾ä¶Ô»º³åÊÇÓÐÓ°ÏìµÄ£¬ËüÃÇ¿ÉÄÜʹ»º³åÖеÄÊý¾Ý¹ýÆÚ¡£Ò»¸ö ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ