Set MySQL to use UTF 8 and convert database
##/etc/my.cnf:
# [mysql]
# default-character-set=utf8
# [mysqld]
# character-set-server=utf8
# collation-server=utf8_general_ci
# [client]
# default-character-set=utf8
/etc/init.d/mysqld stop
/etc/init.d/mysqld start
# dump db
mysqldump -u dbuser -pdbpass --opt --skip-set-charset --default-character-set=
latin1 --skip-extended-insert databasename > database.table.sql
# replace charset
perl -i -pe 's/DEFAULT CHARSET=latin1/DEFAULT CHARSET=utf8/'
database.table.sql
# import db
cat database.table.sql | mysql -u dbuser -pdbpass databasename
Ïà¹ØÎĵµ£º
½üÀ´¶Ôphp±È½Ï¸ÐÐËȤ£¬¾Í¶Ï¶ÏÐøÐøµÄ»¨ÁËÁ½¸öÐÇÆÚµÄʱ¼ä°ÑÕû¸öphp¿ª·¢ÐèÒªÓõ½µÄ¶«Î÷¶¼×°ºÃÁË£¬´ó¸ÅµÄ°²×°¹ý³ÌÈçÏ¡£
Ò»¡¢°²×°µÄÈí¼þ:
Apache: 2.2.14
PHP:5.2.12
MySQL:5.1.42¡£
SVN:1.5.6
PHPMyAdmin:3.2.5
Zend Studio: 7.1
Zend Debugger: 5.1.14
¶þ¡¢°²×°¹ý³Ì£º
1. °²×°ºÍÅäÖÃapache
°²×°£ºÊ×ÏÈ´Óhttp://apa ......
The vs2008 and vs2010 don't support the generation LINQ to SQL business objects from a MySQL database, if you drop a MySql table to a Linq to Sql Class, it will popup a "The selected object(s) use an unsupported data provider" error.
Generation tool DBLinq
DbLinq is a LINQ to SQL data co ......
MySQLÓÐÒ»¸ö¹¦ÄܾÍÊÇ¿ÉÒÔlogÏÂÀ´ÔËÐеıȽÏÂýµÄsqlÓï¾ä£¬Ä¬ÈÏÊÇûÓÐÕâ¸ölogµÄ£¬ÎªÁË¿ªÆôÕâ¸ö¹¦ÄÜ£¬ÒªÐÞ¸Ämy.cnf»òÕßÔÚMySQLÆô¶¯µÄʱºò¼ÓÈëһЩ²ÎÊý¡£
Èç¹ûÔÚmy.cnfÀïÃæÐ޸ģ¬ÐèÔö¼ÓÈçϼ¸ÐÐ
long_query_time = 1
log-slow-queries =
log-queries-not-using-indexes
long_query_time ÊÇÖ¸Ö´Ðг¬¹ý¶à¾ÃµÄsql»á±»logÏÂÀ´£ ......
ת×Ô: http://www.phpweblog.net/lemon2maple/archive/2007/07/29/1397.html
mysqlµÄ³ö´í´úÂë±í£¬¸ù¾ÝmysqlµÄÍ·Îļþmysql/include/mysqld_error.hÕûÀí¶ø³É¡£´íÎóÖ®´¦£¬Çë´ó¼ÒÖ¸Õý¡£
1005£º´´½¨±íʧ°Ü
1006£º´´½¨Êý¾Ý¿âʧ°Ü
1007£ºÊý¾Ý¿âÒÑ´æÔÚ£¬´´½¨Êý¾Ý¿âʧ°Ü
1008£ºÊý¾Ý¿â²»´æÔÚ£¬É¾³ýÊý¾Ý¿âʧ°Ü
1009£º²»ÄÜɾ³ýÊý¾ ......
ʹÓÃhibernate mysql ²åÈëÖÐÎÄ´íÎó£º
ÔÒòÖ®Ò»ÊÇ£º
mysql µÄ×Ö·û±àÂëºÍhibernate´«µÝµÄ±àÂë²»Ò»Ñù£¬
ÀýÈ磺
mysql ½¨¿âµÄʱºò¿ÉÒÔÉèÖñàÂë:
CREATE DATABASE db DEFAULT CHARACTER SET utf8;
hibernate Á¬½ÓmysqlµÄ±àÂ룺
jdbc:mysql://127.0.0.1:3306/db?useU ......