MySQLÃüÁî
1.Á¬½ÓMySQLÊý¾Ý¿â
echo on¡¡¡¡
cd c:\Program Files\MySQL\MySQL Server 5.2\bin
mysql -uroot -ppass
2¡¢ÏÔʾÊý¾Ý¿âÁÐ±í¡£
show databases;
3¡¢ÏÔʾ¿âÖеÄÊý¾Ý±í£º
use mysql; //´ò¿ª¿â£¬
show tables;
4¡¢ÏÔʾÊý¾Ý±íµÄ½á¹¹£º
describe ±íÃû;
5¡¢½¨¿â£º
create database ¿âÃû;
6¡¢½¨±í£º
use ¿âÃû;
create table ±íÃû (×Ö¶ÎÉ趨Áбí);
7¡¢É¾¿âºÍɾ±í:
drop database ¿âÃû;
drop table ±íÃû;
8¡¢½«±íÖмǼÇå¿Õ£º
delete from ±íÃû;
9¡¢ÏÔʾ±íÖеļǼ£º
select * from ±íÃû;
Ïà¹ØÎĵµ£º
1¡¢°²×°Tomcat
JDBCÁ¬½Ó³ØÅäÖõĵÚÒ»²½ÊÇÏÂÔغͰ²×°Tomcat¡£²Î¿¼Tomcat for window µÄ°²×°Ïòµ¼£¬»ù±¾Ö±½Ó°²×°¼´¿É£¬×¢Ò⣺°²×°Ê±»áÌáʾÊäÈë¹ÜÀíÓû§ÃûºÍÃÜÂ룬ÕâÊÇÒÔºó»áÓõ½µÄÓû§ÃûºÍÃÜÂ룬Çмǡ£
2¡¢°²×°MySql
ĬÈÏ°²×°¼´¿É¡£
3¡¢Ê¹ÓÃTomcatµÄWeb¹ÜÀíÓ¦ÓÃÅäÖÃÊý¾ÝÔ´
Æô¶¯Tomcat·þÎñÆ÷£¬´ò¿ªä¯ÀÀÆ÷£¬ÊäÈëhttp://loca ......
* mysqlÊ×ÏȽ«Äõ½µÄÊý¾Ýת»»Îªcharacter_set_clientÖ¸¶¨µÄ±àÂë¸ñʽ£¬È»ºóת»»Îª character_set_connectionÖ¸¶¨µÄ¸ñʽ£¬×îºóÔÙ½«Êý¾Ý´æ´¢µ½Êý¾Ý¿â£¬´æ´¢¸ñʽΪcharacter_set_databaseËùÖ¸¶¨µÄ¸ñʽ£»
* ´ÓÊý¾Ý¿â¶ÁÊý¾Ýʱ£¬½«Êý¾Ý¿â¸ñʽת»»Îªcharacter_set_resultsÖ¸¶¨µÄ¸ñʽ£¬ÔÙ·¢Ë ......
## **********first test,procedure**********
#<1>
use testprocedure;
delimiter //
create procedure simpleproce1 (out par1 int)
begin
select count(*) into par1 from proce;
end
//
delimiter ;
call simpleproce1(@a);
select @a;
#<2>,ÿ´ÎÖ»Óе¥Ò»µÄÐпÉÒÔ±»È¡»Øselect id,name i ......
ÐÂʹÓÃMySQL£¬ËµÆðÀ´ÊǸö¼òµ¥µÄÊÂÇ飬µ«ÊÇÈ´·ÑÁËЩÖÜÕÛ£º
1¡¢µÇ½·þÎñÆ÷¶Ë£¬½øÈëÃüÁîÐУ¬windows cmd;
2¡¢ÉèÖÃÓû§¡¢ÃÜÂëÈÃÖ¸¶¨µÄIP·ÃÎÊ£ºmysql -u root -p »ò°²×°µÄ¿ì½Ý·½Ê½½øÈë:MySQL Command Line Client,ʹÓÃgrantÃüÁ
grant ȨÏÞ1,ȨÏÞ2,…ȨÏÞn on Êý¾Ý¿âÃû³Æ.±íÃû³Æ to Óû§Ãû@Óû§µØÖ· identified ......
×Ô´ÓÈÏʶmysqlµÄÄÇÌìÆð¾ÍÖªµÀvarcharµÄ³¤¶ÈÏÞÖÆΪ255£¬²»¹ýÏÖÔÚÕâÖÖÇé¿öÒѾ¸Ä±äÁË£º
Values in VARCHAR columns are variable-length strings. The length can be specified as a value from 0 to 65,535. The effective maximum length of a VARCHAR is subject to the maximum row size (65,535 by ......