mysql µÄ×Ö·û±àÂë
=== ÉÔºóÔÙÕûÀí
mysql
4.0µ½mysql
5.0µÄÊý¾Ýµ¼Èë³öÏÖÂÒÂëµÄ½â¾ö·½°¸
×ÖÌå´óС£º´ó
| ÖÐ
| С
2007-02-08 17:09 -
ÔĶÁ£º485 - ÆÀÂÛ
£º0
×î½ü×ömysql
4.0µ½mysql
5.0µÄÊý¾Ýת»¯¹¤×÷£¬·¢ÏÖÂÒÂë
ÎÞÊý£¬¹Û²©¿ÍÎÞÊýÐĵÃÈçÏ£º
£ªmysql
ÖÐÎÄ亂碼µÄÔÒò
mysql
會³ö現ÖÐÎÄ亂碼µÄÔÒò²»ÍâºõÏÂÁÐ幾點£º
-mysql
server±¾Éí設¶¨問題£¬ÀýÈç還Í£ÁôÔÚ latin1
-mysql
table µÄ語ϵ設¶¨問題(°üº¬ character 與 collation)
-¿Í戶¶Ë³Ìʽ(ÀýÈç php) µÄ連線語ϵ設¶¨問題
ÕâÊÇÓÉÓÚ mysql
5.0ĬÈÏÊÇlantinÈðµäÓïϵ£¬Òò´ËÔÚmysql
4.0µ¼³öµÄsqlÎļþÀïÃæÐèÒª¼ÓÈëDEFAULT CHARSET
=utf8 collate
utf8_unicode_ci
ÀýÈ磺
CREATE TABLE IF NOT EXISTS `user_right` (
`user_right_id` int(11) NOT NULL auto_increment,
`user_id` varchar(11) default NULL,
`right_id` varchar(11) default NULL,
PRIMARY KEY (`user_right_id`)
) TYPE=MyISAM DEFAULT CHARSET
=utf8 collate
utf8_unicode_ci
AUTO_INCREMENT=11 ;
È»ºóÔÚphpÁ¬½ÓÊý¾Ý¿â×î³õÖ´ÐÐ"SET NAMES 'utf8'"£»
ÎÊÌâ½â¾ö£¡ÒÔÉÏÕë¶Ôutf8±àÂëµÄÊý¾Ý¿â£¬±Ï¾¹ÊÇÇ÷ÊÆÂÆäËü±àÂëÓдýÉÔ¿ÕµÄʱºòÑо¿
Ïà¹ØÎĵµ£º
mysql½Ì³Ì:¸ßÊÖÊÇÔõÑùÁ¶³ÉµÄ:¾«ÃîSQLÓï¾ä½éÉÜ
[ÈÕÆÚ£º2009-06-02] À´Ô´£º ×÷Õߣº
ÈçºÎ´Óһλ²ËÄñÍɱä³ÉΪ¸ßÊÖ£¬Áé»îʹÓõÄSQLÓï¾äÊDZز»¿ÉÉٵġ£±¾ÎÄÊÕ¼¯Á˲¿·Ö±È½Ï¾µä£¬³£ÓõÄSQLÓï¾ä¹©´ó¼Ò²Î¿¼£¬Ï£Íû¶Ô´ó¼ÒÓÐËù°ïÖú¡£
¡¡¡¡ËµÃ÷£º¸´ÖƱí(Ö»¸´Öƽṹ,Ô´±íÃû£ºa бíÃû£ºb)¡¡¡¡
¡¡¡¡SQL: select * into ......
//Ö÷¼ü
alter table tabelname add new_field_id int(5) unsigned default 0 not null auto_increment ,add primary key (new_field_id);
//Ôö¼ÓÒ»¸öÐÂÁÐ
alter table t2 add d timestamp;
alter table infos add ex tinyint not null default '0';
//ɾ³ýÁÐ
alter table t2 drop column c;
//ÖØÃüÃûÁÐ
......
<>ÕûÀíÁËÒÔÏÂËÄÖÖÔÚMySQLÖÐÐÞ¸ÄrootÃÜÂëµÄ·½·¨,¿ÉÄܶԴó¼ÒÓÐËù°ïÖú!
·½·¨1£º ÓÃSET PASSWORDÃüÁî
¡¡¡¡mysql -u root
¡¡¡¡mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('newpass');
·½·¨2£ºÓÃmysqladmin
¡¡¡¡mysqladmin -u root password "newpass"
¡¡¡¡Èç¹ûrootÒѾÉèÖà ......
Ò»¡¢»ù´¡
1¡¢ËµÃ÷£º´´½¨Êý¾Ý¿â
Create DATABASE database-name
2¡¢ËµÃ÷£ºÉ¾³ýÊý¾Ý¿â
drop database dbname
3¡¢ËµÃ÷£º±¸·Ýsql server
--- ´´½¨ ±¸·ÝÊý¾ÝµÄ device
USE master
EXEC sp_addumpdevice 'disk', 'testBack', 'c:\mssql7backup\MyNwind_1.dat'
--- ¿ªÊ¼ ±¸·Ý
BACKUP DATABASE pubs TO testBack
4 ......
L1¡¢HTML¾²Ì¬»¯
Æäʵ´ó¼Ò¶¼ÖªµÀ£¬Ð§ÂÊ×î¸ß¡¢ÏûºÄ×îСµÄ¾ÍÊÇ´¿¾²Ì¬»¯µÄhtmlÒ³Ã棬ËùÒÔÎÒÃǾ¡¿ÉÄÜʹÎÒÃǵÄÍøÕ¾ÉϵÄÒ³Ãæ²É Óþ²Ì¬Ò³ÃæÀ´ÊµÏÖ£¬Õâ¸ö×î¼òµ¥µÄ·½·¨ÆäʵҲÊÇ×îÓÐЧµÄ·½·¨¡£µ«ÊǶÔÓÚ´óÁ¿ÄÚÈݲ¢ÇÒƵ·±¸üеÄÍøÕ¾£¬ÎÒÃÇÎÞ·¨È«²¿ÊÖ¶¯È¥°¤¸öʵÏÖ£¬ÓÚÊdzöÏÖÁËÎÒÃdz£¼ûµÄÐÅÏ¢ ·¢²¼ÏµÍ³CMS£¬ÏñÎÒÃdz£·ÃÎʵĸ÷¸öÃÅ»§Õ¾µãµÄÐ ......