mysql³£ÓÃÃüÁî
1¡¢mysqlÊý¾Ý¿âÓÐÁ½ÖÖÇý¶¯£º
MySQL Connector/J Driver¡¢MMMysql driver¡£
2¡¢µ¼Èëµ¼³öÊý¾Ý¿âÃüÁ£¨binĿ¼Ï£©
µ¼³ö£ºmysqldump -u root -p bokele >c:/mysql.sql --default-character-set=gbk
µ¼È룺C:\mysql\bin\> mysql -u root -p
˵Ã÷£ºC:\mysql\bin\±íʾ½øÈëmysql³ÌÐò¸ùĿ¼
C:\helloapp\schema\sampledb.sqlÊÇÒªµ¼ÈëÊý¾Ý¿âµÄÎļþµÄλÖÃ
c:/mysql.sqlÊǵ¼³öµÄsqlÎļþ
--default-character-set=gbk Ö¸±àÂ뷽ʽ
3¡¢ÐÞ¸Äroot¿ÚÁ£¨binĿ¼Ï£©
bin>mysql -u root -p
mysql>set password for root@localhost=password('123');
˵Ã÷£º½«rootµÄ¿ÚÁîÉèÖÃΪ123
4¡¢Æô¶¯Í£Ö¹mysql¿Í»§³ÌÐò£¨binĿ¼Ï£©
1£©mysql -u root -p
2£©£¨ÊäÈëÃÜÂ룩
3£©create database SAMPLEDB
4£©user SAMPLE
5£©£¨¸÷ÖÖsql²Ù×÷£©
6£©exit£¨Í˳ö£©
5¡¢Æô¶¯ºÍÍ£Ö¹mysql·þÎñ£¨ÃüÁîÐÐÏ£©
Æô¶¯£ºnet start mysql Í£Ö¹£ºnet stop mysql
6¡¢×¢²áºÍɾ³ýmysql·þÎñ£¨binĿ¼Ï£©
×¢²á£ºmysqld-nt --install ɾ³ý£ºmysqld-nt --remove
7¡¢µ¼ÈëmysqlÊý¾Ý¿âʱ³öÏÖ£ºData too long for column '***' at row *£¬
ÃèÊö£ºmysqlÓÃUTF8×Ö·û¼¯£¬±¸·ÝÎļþ£¨***.sql£©ÊÇgbk¸ñʽµÄ£¬ÔËÐÐC:\mysql\bin\> mysql -u root -p
·ÖÎö£ºÒòΪmysqlÓÃutf8±àÂ룬ËùÒÔÒ»¸ö×Ö½ÚÕ¼24루UTF8×Ö·ûÊǿɱ䳤¶È£¬Ó¢ÎÄ8룬ÖÐÎÄ24λ£¬ÎªÂú×ãÈ«ÊÇÖÐÎÄÇé¿ö£¬ÓÃ24λ±íʾ£©£¬µ«mysqlµÄvarcharÀàÐÍÓÐ×î´ó³¤¶È£¬¶ø255×24¿ÉÄܳ¬¹ý×î´ó³¤¶È£¬ËùÒÔ±¨´í¡£¿É¼ûÔ±¸·ÝÎļþ½¨Êý¾Ý¿âʱӦ¸ÃʹÓõIJ»ÊÇUTF8£¬¶øӦΪһ¸ö×Ö·ûÕ¼8λµÄlatin1±àÂ뷽ʽ£¬ÕÒµ½ÎÊÌâ´ð°¸¡£
½â¾ö£ºÔÚ½¨±íÎļþ¶¥¶Ë¼ÓÈëÒÔÏÂÓï¾ä£º
drop database if exists Web;//WebΪҪ½¨µÄÊý¾Ý¿â
create database Web default charset=latin1 ;
use Web;
set charset latin1;
7. ÅäÖÃ×Ö·û¼¯
½¨¿âʱÅäÖÃ×Ö·û¼¯
create database testxxx default charset=utf8
½¨±íʱÅäÖÃ×Ö·û¼¯
CREATE TABLE `t_agent` (
`ID` smallint(5) NOT NULL
) DEFAULT CHARSET=utf8 ;
ÐÞ¸Ä×Ö·û¼¯
Windowsƽ̨
windowsϵÄmysqlÅäÖÃÎļþÊÇmy.ini,Ò»°ãÔÚc:\windows\my.ini»òÕßc:\winnt\my.ini¿ÉÒÔÖ±½ÓÔÚÕâ¸öÎļþÀïÃæ¼ÓÉÏ
default-character-set=gbk #»ògb2312,big5,utf8
È»ºóÖØÐÂÆô¶¯mysql
se
Ïà¹ØÎĵµ£º
ÍøÉϵĽâ¾ö·½·¨´ó¶àÊÇÒªÐÞ¸ÄmysqlÅäÖÃÎļþ£¬¶ÔÎÒÃDz»Êʺϡ£jhostÖ÷Ò³ÉÏ¿´µ½ÆªÎÄÕ£¬µ«ÀïÃæ˵µÄÇý¶¯Ôç¾ÍÊÇÀÏÇý¶¯ÁË£¬»³ÒÉËûÊÇ´ÓÍøÉϸ´ÖƹýÀ´µÄÀÏ°æ±¾£¬²»ÖªÊÇ·ñÄÜÓá£ÏÖÔÚ°ÑÎÒ×Ô¼ºµÄ½â¾ö·½°¸Ìù³öÀ´£¬¹©´ó¼Ò²Î¿¼£¬»¶ÓÅúÆÀÖ¸Õý¡£
´ó¼Ò×¢ÒâºìÉ«²¿·Ö£¬·Ï»°²»¶à˵£º
µÚÒ»²½£ºÍøҳͷÉèÖãº
<%@ page contentType="text/html ......
¡ù ¹ØÓÚMySQLµÄ1067´íÎó½â¾ö·½·¨ ¡ù
ÄÚÈÝ£º
*************
1
°²×°MYSQLºó¸ü¸ÄÁËROOTµÄÃÜÂëºóÓÃ
net startmysql
Æô¶¯Ê±ÎÒ¾ÍÓöµ½ÁËÕâÑùµÄÎÊÌ⣮ʹÓÃÒÔÏÂÃüÁîºó
c:\mysql\bin\mysqladmin-u root -p shutdown
ÔÙnet start mysql¾ÍûÓÐÕâ¸ö´íÎóÌáʾÁË!
*************
2
MySQLµÄ1067´íÎó
Q£ºÎÒµÄMysqlÅöµ½ÁË 1 ......
һֱʹÓÃMysql£¬×î½ü²ÅÁ˽⵽MysqlÖ§³ÖÁËTransaction¡£ÀÏÁË£¬¸ú²»ÉÙ³±Á÷ÁË¡£
ÄǾͰÑÔÀ´µÄÓ¦ÓøijÉBased On TransactionµÄ°É¡£
½«½¨±íÓï¾ä¸Ä³ÉEngine=InnoDB£¬ºÃÏñ»¹ÊDz»ÐУ¬Ã»ÓÐÏëÏóÖÐÄÇô¼òµ¥¡£
²éÒ»²é£¬Å¶£¬·¢ÏÖXAMPP°²×°µÄMysql»¹ÒªÐÞ¸ÄconfÎļþ£º
XAMPP from Apache Friends is a collection of free open s ......
ΪʲôѡÔñÔ´Âë±àÒë°²×°mysql£ºÎÒÔÚʹÓÃrpm»òÕßÊÇyum°²×°Ê±myql£¬ÀÏÊÇÌáʾÎÒÕÒ²»µ½*.sockÎļþ£¬ÕÒÁ˵ã
×ÊÁÏ˵ÊǸðüÊǷǹٷ½°æ±¾£¨Ã÷Ã÷Êǹٷ½ÏÂÔØ µÄ£©£¬ÆäÖÐÔÒòµ½ÏÖÔÚ»¹Ã»ÓиãÇå³þ¡£Ï£ÍûÖªÇéÈËÊ¿¸æÖª¡££¨¿ªÊ¼±àÒëµÄʱºò£¬ÏµÍ³»·¾³Ò»¶¨ÒªÅäÖúã¬GCC£¬GC++...µÈµÈµÄ±àÒëÆ÷Ò»¶¨Òª×öºÃ,±¾È˵ÄcentosÓÉÓÚ¿ªÊ¼
ϵͳ»·¾ ......