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

mysqlÌí¼ÓÓû§

mysqlÌí¼ÓÓû§·½·¨ 
½¨Á¢Êý¾Ý¿âgamesp
create database gamesp;
Ìí
¼ÓÓû§
grant  all  on  Êý¾Ý¿âÃû.*   to   Óû§
Ãû
@localhost  identified  by  'ÃÜÂë';
grant all on gamesp.* to
newuser@localhost
identified by
'password';
˵Ã÷£º
£¨1£©grant all ¸³ÓèËùÓеÄȨÏÞ
£¨2£©gamesp.* Êý¾Ý¿â gamesp ÖÐËùÓеıí
£¨3£©newuser Óû§Ãû
£¨4£©@localhost ÔÚ±¾µØµçÄÔÉ쵀 mysql server ·þÎñÆ÷
£¨5£©identfified by 'password' ÉèÖÃÃÜÂë
ɾ³ýÓû§
use mysql
mysql
>Delete
from user Where User="xxxxx" and Host="localhost";
mysql
>flush
privileges;


Ïà¹ØÎĵµ£º

mysql sql °ÙÍò¼¶Êý¾Ý¿âÓÅ»¯·½°¸

1.¶Ô²éѯ½øÐÐÓÅ»¯£¬Ó¦¾¡Á¿±ÜÃâÈ«±íɨÃ裬Ê×ÏÈÓ¦¿¼ÂÇÔÚ where ¼° order by Éæ¼°µÄÁÐÉϽ¨Á¢Ë÷Òý¡£
2.Ó¦¾¡Á¿±ÜÃâÔÚ where ×Ó¾äÖжÔ×ֶνøÐÐ null ÖµÅжϣ¬·ñÔò½«µ¼ÖÂÒýÇæ
·ÅÆúʹÓÃË÷Òý¶ø½øÐÐÈ«±íɨÃ裬È磺
select id from t where num is null
¿ÉÒÔÔÚnumÉÏÉèÖÃ
ĬÈÏÖµ0£¬È·±£±íÖÐnumÁÐûÓÐnullÖµ£¬È»ºóÕâ
Ñù²éѯ£º
sel ......

MySql²Ù×÷Àà

×î½üдÁËÒ»¸ö¼òµ¥µÄMysql²Ù×÷À࣬ÄóöÀ´ºÍ´ó¼Ò·ÖÏíһϣ¬»¹Çë¸÷λ¸ßÊÖÖ¸ÕýÒ»ÏÂÎö¹¹º¯ÊýµÄÓ÷¨£º
<?php
/*
* Created on 2010-5-25
*
* To change the template for this generated file go to
* Window - Preferences - PHPeclipse - PHP - Code Templates
*
* class mysql
* made by S71ENCE
*/
class mysql ......

mysqlµÃµ½²éѯ½á¹ûµÄͬʱͳ¼Æ²éѯ½á¹ûµÄÊýÄ¿

×öһЩÊý¾Ý¿â²éѯ£¬²»½öÏ£ÍûµÃµ½Òª²éѯµÄ½á¹û£¬»¹Ï£Íû·½±ãµØͳ¼Æһϲéѯ½á¹ûÖÐÓжàÉÙÌõ¼Ç¼¡£ÎÒͨ³£µÄ×ö·¨ÊÇ£º
$q = "select * from $fromTable where $where limit $start,$pageSize";
$r = mysql_query($q);
$q = "select count(*) from $fromTable where $where";
$cnt = mysql_query($q);
µ± ......

phpÁ¬½Ómysql²âÊÔºÍÅäÖÃ


phpÁ¬½Ómysql²âÊÔ´úÂ룺
$link=mysql_connect('localhost','root','123456');
if(!$link) echo "ʧ°Ü!";
else echo "³É¹¦!";
mysql_close();
?>
ÔËÐдúÂë³öÏÖ£ºCall   to   undefined   function   'mysql_connect()'… ʧ°Ü
°Ù¶ÈÕÒµ½½á¹ûÊÇPHP+MYSQL »·¾³Ã ......

mysqlÖ÷´ÓÊý¾Ý¿â²Ù×÷

Ö÷£º
show master status;
+-----------------+------------+-------------------+-----------------------+
| File                |
Position     | Binlog_Do_DB   | Binlog_Ignore_DB |
+------------ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ