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

MySQL Ãâ°²×°°æÅäÖÃ

1.ÏÂÔØ MySQL 6.0Ãâ°²×°°æ
http://www.mysql.com/downloads/mirror.php?id=386828
2.½« MySQL6.0 ½âѹµ½´ý°²×°Ä¿Â¼(×Ô¼º¾ö¶¨·Åµ½ÄÄ£©¡£½âѹºóĬÈÏÎļþ¼ÐÃû³ÆΪ£ºmysql£¨µ±È»¿ÉÒÔ×Ô¼º¸ü¸Ä£©£¬È»ºóÔÚ»·¾³±äÁ¿ÖÐÉèÖÃMYSQL_HOME£¨ÕâÑù£¬ÒÔºó¿ÉÒÔÓÃ%MYSQL_HOME%ÒýÓð²×°Ä¿Â¼£©¡£È磬ÎÒ·ÅÔÚEÅ̸ùĿ¼Ï£¬ËùÒÔ£¬MYSQL_HOMEÉèÖÃΪ£ºE:\mysql
3.´ò¿ªÎļþmy-huge.iniÁí´æΪmy.ini£¬ÔÚmy.iniÎļþ×îºó£¨µ±È»Ò²¿ÉÒÔÔÚÆäËûµØ·½£©¼ÓÈëÈçÏÂÅäÖá£(my.ini¼ÇµÃÊDZ£´æÔÚÓëmy-huge.iniͬһ¸öĿ¼Ïµģ©(#±íʾעÊÍ£©
[mysqld]
# ÉèÖÃmysqlµÄ°²×°Ä¿Â¼
basedir=E:\mysql
# ÉèÖÃmysqlÊý¾Ý¿âµÄÊý¾ÝµÄ´æ·ÅĿ¼£¬±ØÐëÊÇdata£¬»òÕßÊÇ[url=file://\\xxx-data]\\xxx-data[/url]
datadir=E:\mysql\data
4.°Ñ%MYSQL_HOME%\bin ¼ÓÈëµ½ path»·¾³±äÁ¿ÖС£
5.ÔÚÃüÁîÐУ¨cmd£©Ö´ÐÐÃüÁmysqld -install  ¡£½«mysql°²×°Îªwindows·þÎñ¡££¨Ò»¶¨×¢Ò⣬ִÐдËÃüÁîʱһ¶¨ÒªÔÚ°²×°Ä¿Â¼ÏµÄ\binĿ¼ÏÂÖ´ÐС£·ñÔò»á³öÎÊÌâ¡££©
6.Ö´ÐÐÃüÁ net start mysql »òÔÚwindows¹ÜÀí¹¤¾ß->·þÎñÀïÕÒµ½MySQL·þÎñ£¬Æô¶¯¡£
5.ÔÚÃüÁîÐÐÖÐÔËÐÐ mysql -uroot  £¨¿ÉÔÚÈÎÒâĿ¼Ï£¬ÒòΪǰÃæÉèÖÃÁËpath±äÁ¿£©¡£¼´¿É½øÈëÊý¾Ý¿â¡£
Ò»°ãÇé¿öÏ£¬ÕâÑù²Ù×÷ºó£¬mysql°²×°Íê³É¡£
×¢£º
Èç¹ûÒÔǰϵͳ´æÔÚmysql¡£Ôò½øÈëÒÔǰϵͳ´æÔÚµÄmysqlĿ¼,Ö´ÐÐ mysqld-nt.exe --remove(ÏÈ´ÓϵͳÖÐÒƳýmysql·þÎñ)ÔÚ¿ªÊ¼Ö´ÐÐÉÏÃæµÚ4²½¡£
¡ïÉèÖÃMySQLÖÐÎÄ×Ö·û¼¯£¨MySQLÕý³£ÏÔʾÖÐÎÄ£©
1).ÅäÖ÷þÎñÆ÷¶Ë£¬ÐÞ¸Ämy.iniÎļþ£¬Ê¹ÓÃÖÐÎÄ×Ö·û¼¯´æ´¢¼Ç¼£¬Í¬Ê±ÓÃÖÐÎÄÅÅÐò±È½Ï·½Ê½¡£
[mysqld]
# set character set,ʹÓÃÖÐÎÄ×Ö·û¼¯´æ´¢¼Ç¼
default-character-set=gbk
# set character collation,ʹÓÃÖÐÎÄÅÅÐò±È½Ï·½Ê½
default-collation=gbk_chinese_ci
2). Èç¹ûÒªÔÚÖÐÎÄ»·¾³µÄ·þÎñÆ÷¶ËʹÓÃmysqlÃüÁîÐУ¬¸Ä±ämy.iniÎļþÖÐmysqlµÄĬÈÏ×Ö·û¼¯¡£
[mysql]
# set character set
default-character-set=gbk
¡ïÐÞ¸ÄrootÃÜÂë
MySQLÅäÖúúó£¬Æô¶¯³É¹¦£¬Ä¬ÈÏÃÜÂëÊÇ¿Õ£¬µ«ÊÇΪÁË°²È«£¬ÉèÖÃÃÜÂ루MySQLÓÐÒ»¸öĬÈÏÓû§ÃûΪroot£¬ÃÜÂë×Ô¼ºÉ趨£º¼ÙÈçÉèΪroot£©¡£
1£©µÇ¼MySQL rootÓû§£º
   ´ò¿ªÃüÁîÐУ¬Ö´ÐУºmysql -uroot
2£©ÐÞ¸ÄrootÃÜÂ룺
       mysql> update mysql.user set password="root" where User=''root'';
       mysql> flush privileg


Ïà¹ØÎĵµ£º

¹ØÓÚMySQL±íÉè¼ÆÓ¦¸Ã×¢ÒâµÄÎÊÌâ

¹ØÓÚMySQL±íÉè¼ÆÓ¦¸Ã×¢ÒâµÄÎÊÌâ
ת×Ô http://blog.chinaunix.net/u/29134/showart_1316574.html
1¡¢É÷ÖØÑ¡Ôñ±íÃû¡£
ÓÐÁ½ÖÖÑ¡Ôñ£º
°´ÕÕ¶àÊý¿ª·¢ÓïÑÔµÄÃüÃû¹æÔò¡£±ÈÈ磨myCustomer£©¡£
°´ÕÕ¶àÊý¿ªÔ´Ë¼ÏëÃüÃû¹æÔò¡£±ÈÈ磨my_customer£©¡£
°´ÕÕÔÛÃÇÖйúÈ˵Ä˼Ïë¡£±ÈÈ磨ÎҵĿͻ§£©¡£
µÚÒ»ÖÖÓиöȱµã£¬ºÜÈÝÒ×Íüµô´óдµÄ×Ö ......

ubuntu MySQL°²×°Ö¸ÄÏ

Òª°²×° MySQL£¬¿ÉÒÔÔÚÖÕ¶ËÌáʾ·ûºóÔËÐÐÏÂÁÐÃüÁ
sudo apt-get install mysql-server
sudo apt-get install mysql-client
sudo apt-get install php5-mysql
// °²×°php5-mysql Êǽ«phpºÍmysqlÁ¬½ÓÆðÀ´
Ò»µ©°²×°Íê³É£¬MySQL ·þÎñÆ÷Ó¦¸Ã×Ô¶¯Æô¶¯¡£Äú¿ÉÒÔÔÚÖÕ¶ËÌáʾ·ûºóÔËÐÐÒÔÏÂÃüÁîÀ´¼ì²é MySQL ·þÎñÆ÷ÊÇ·ñÕýÔÚÔËÐУº ......

apacheµÄ¾²Ì¬/¶¯Ì¬±àÒëÔÚapache+php+mysqlµÄÓ¦ÓÃ

apacheµÄ¾²Ì¬/¶¯Ì¬±àÒëÔÚapache+php+mysqlµÄÓ¦ÓÃ
ÎÒÏë´ó¼ÒÓв»ÉÙ¶¼³É¹¦ÊµÏÖapache+php+mysql£¬ÍøÉϵÄÎÄÕÂÒ²Óв»ÉÙ£¬µ«ÎÒ·¢ÏÖ²»ÉÙÎÄÕ¶¼Êdz­À´³­È¥£¬²¢ÇÒ
ûÓÐ˵Ã÷°×±àÒëµÄ·½Ê½£¬ÓеÄË÷ÐÔapache1.3µÄ±àÒë·½·¨Ô­·â²»¶¯µÄ°á¹ýÀ´Ì×ÔÚapache2.0£¬ÏÔÈ»Îóµ¼Ò»Ð©²ËÄñ £¡
ÎÒ½ñÌì¾ÍÒÔapache+mysql+php˵һϾ²Ì¬±àÒëºÍDSO¶¯Ì¬±à ......

MySql時間º¯數


Ò»¡¢MySQL »ñµÃµ±Ç°ÈÕÆÚʱ¼ä º¯Êý
1.1 »ñµÃµ±Ç°ÈÕÆÚ+ʱ¼ä£¨date + time£©º¯Êý£ºnow()
mysql> select now();
+---------------------+
| now() |
+---------------------+
| 2008-08-08 22:20:46 |
+---------------------+
³ýÁË now() º¯ÊýÄÜ»ñµÃµ±Ç°µÄÈÕÆÚʱ¼äÍ⣬MySQL Öл¹ÓÐÏÂÃæµÄº¯Êý£º
......

ʹÓÃhibernateÓëmysqlʱÊý¾Ý²»ÄܲåÈëµÄÔ­Òò¼°½â¾ö°ì·¨

1.±³¾°     
      Ö®Ç°´ÓûÓùýhibernate£¬Òò´ËÔÚÍøÉÏËÑÁËÒ»ÏÂhibernate¿ìËÙÈëÃÅ·½ÃæµÄÐÅÏ¢£¬×îºóÎÒ°´ÕÕ¡¶Myeclipse Hibernate ¿ìËÙÈëÃÅ ÖÐÎÄ°æ¡·£¨CSDN£¬°Ù¶ÈÎĿⶼÓУ©Ò»ÎÄ¿ªÊ¼ÁËÎÒµÄhibernateÖ®Âã¨ÎªÏîÄ¿×ö¼¼Êõ×¼±¸£©¡£
      ÏÂÃ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ