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

ubuntuϸü¸ÄmysqlĬÈϱàÂë(×Ö·û¼¯)

ubuntuϸü¸ÄmysqlĬÈϱàÂë(×Ö·û¼¯)
http://blog.csdn.net/zzuduoduo/archive/2009/05/02/4142504.aspx
°²×°mysql
sudo apt-get install mysql-server #Ö±½Ó×Ô¶¯»ñµÃ¿ÉÓð汾
Ò²¿ÉÒÔÕâÑùд
sudo apt-get install mysql-server-5.0 #°²×°mysql·þÎñÆ÷5.0°æ±¾
°²×°ºó
/etc/init.d/mysql start (stop) ΪÆô¶¯ºÍÍ£Ö¹·þÎñÆ÷
/etc/mysql/ Ö÷ÒªÅäÖÃÎļþËùÔÚλÖà my.cnf
/var/lib/mysql/ ·ÅÖõÄÊÇÊý¾Ý¿â±íÎļþ¼Ð£¬ÕâÀïµÄmysqlÏ൱ÓÚwindowsÏÂmysqlµÄdateÎļþ¼Ð
Æô¶¯mysqlºó£¬ÒÔrootµÇ¼mysql
isher@isher-ubuntu:~$ mysql -u root
>show variables like 'character%'; #Ö´ÐбàÂëÏÔʾ
+--------------------------+----------------------------+
| Variable_name | Value |
+--------------------------+----------------------------+
| character_set_client | latin1 |
| character_set_connection | latin1 |
| character_set_database | latin1 |
| character_set_filesystem | binary |
| character_set_results | latin1 |
| character_set_server | latin1 |
| character_set_system | utf8 |
| character_sets_dir | /usr/share/mysql/charsets/ |
+--------------------------+----------------------------+
ÔÚijЩʱºò£¬ÎÒÃÇÐøÒªÐÞ¸ÄmysqlĬÈÏÊý¾Ý¿âµÄ±àÂ룬ÒÔ±£Ö¤Ä³Ð©Ç¨ÒƵijÌÐò¿ÉÒÔÕý³£ÏÔʾ£¬±à¼­my.cnfÎļþ½øÐбàÂëÐÞ¸Ä,windows¿ÉÒÔÖ±½ÓÓãÍysql Server Instance Config Wizard ½øÐÐÉèÖÃ
ÔÚlinuxÏÂÐÞ¸Ä3¸ömy.cnfµÄ1¸ö/etc/mysql/my.cnfÎļþ
ÕÒµ½¿Í»§¶ËÅäÖÃ[client] ÔÚÏÂÃæÌí¼Ó
default-character-set=utf8 ĬÈÏ×Ö·û¼¯Îªutf8
ÔÚÕÒµ½[mysqld] Ìí¼Ó
default-character-set=utf8 ĬÈÏ×Ö·û¼¯Îªutf8
init_connect='SET NAMES utf8' £¨É趨Á¬½ÓmysqlÊý¾Ý¿âʱʹÓÃutf8±àÂ룬ÒÔÈÃmysqlÊý¾Ý¿âΪutf8ÔËÐУ©
Ð޸ĺúó£¬ÖØÐÂÆô¶¯mysql ¼´¿É£¬²éѯһÏÂshow variables like 'character%';
+--------------------------+----------------------------+
| Variable_name | Value |
+--------------------------+----------------------------+
| character_set_client | utf8 |
| character_set_connection | utf8 |
| character_set_database | utf8 |
| character_set_filesystem | binary |
| character_set_results | utf8 |
| character_set_server | utf8 |
| character_set_system | utf8 |
| character_se


Ïà¹ØÎĵµ£º

mysqldump½øÐÐMysql ±¸·Ý


mysqlÊý¾Ý¿âµ¼³öÒªÓõ½MySQLµÄmysqldump¹¤¾ß£¬»ù±¾Ó÷¨ÊÇ£º 
 
shell> mysqldump [OPTIONS] database [tables]
 
Èç¹ûÄã²»¸ø¶¨ÈÎºÎ±í£¬Õû¸öÊý¾Ý¿â½«±»µ¼³ö¡£
ͨ¹ýÖ´ÐÐmysqldump --help£¬ÄãÄܵõ½ÄãmysqldumpµÄ°æ±¾Ö§³ÖµÄÑ¡Ïî±í¡£ 
×¢Ò⣬Èç¹ûÄãÔËÐÐmysqldumpûÓÐ--quick»ò--optÑ¡Ïmysq ......

MysqlÖÐÎÄÂÒÂëÎÊÌâ


MysqlĬÈϵıàÂëÊÇlatin1£¬ËùÒÔͨ¹ýSqlyog»òÕßJava³ÌÐò¶ÁдÊý¾Ý¿âʱ£¬ÖÐÎĶ¼½«ÏÔʾΪÂÒÂ룬µ«ÔÚ¿ØÖÆ̨ͨ¹ýÃüÁîÐпÉÒÔÏÔʾÖÐÎÄ¡£
ÈçºÎ½â¾öÖÐÎÄÂÒÂëÎÊÌâÄØ£¬¸Ä±äMysqlϵͳµÄ±àÂ뷽ʽ£¬ÔÚMySqlĿ¼ÏµÄmy.iniÎļþÖеÄdefault-character-set=latin1¸ÄΪdefault-character-set=gbk(»òÆäËû),ÔÙÖØÆô·þÎñ¡£µ«ÈÔÈ»ÏÔʾΪÂÒÂ룬ԭÀ ......

MySqlÃâ°²×°°æµÄÏà¹ØÅäÖÃ

   1)¡¢È¥sunµÄ¹ÙÍøÏÂÔØÒ»¸ömysqlµÄѹËõ°ü£¬ÎÒÏÂÔصÄÊÇmysql-noinstall-5.5.0-m2-win32.zip¡£
   2)¡¢°ÑÉÏÃæÏÂÔصÄѹËõ°ü½âѹµ½£ºD:\Program Files\mysqlÏÂÃæ¡£
   3)¡¢ÔÚ D:\Program Files\mysql\ ÖÐÕÒ my-large.ini °ÑËü¸´ÖÆ³É my.ini¡£
   4)¡¢ÔÚ my.ini ÖÐÕÒ [mysqld] £¬Ìí ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ