ubuntuϸü¸ÄmysqlĬÈϱàÂë(×Ö·û¼¯)
°²×°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_sets_dir | /usr/share/mysql/charsets/ |
+--------------------------+------------------------
Ïà¹ØÎĵµ£º
SQL Injection with MySQL
±¾ÎÄ×÷Õߣºangel
ÎÄÕÂÐÔÖÊ£ºÔ´´
·¢²¼ÈÕÆÚ£º2004-09-16
±¾ÎÄÒѾ·¢±íÔÚ¡¶ºÚ¿Í·ÀÏß¡·7Ô¿¯£¬×ªÔØÇë×¢Ã÷¡£ÓÉÓÚдÁ˺ܾã¬Ëæ׿¼ÊõµÄ½ø²½£¬±¾ÈËÒ²·¢ÏÖ¸ÃÎÄÀïÓв»ÉÙ´íÎóºÍÂÞàµĵط½¡£Çë¸÷λ¸ßÊÖ¿´Á˲»ÒªÐ¦¡£±¾ÎÄдÓÚ¡¶Advanced SQL Injection with MySQL¡·Ö®Ç°Ò»¸öÔ¡£
ÉùÃ÷
¡¡¡¡±¾ÎĽöÓÃÓÚ½ ......
1.°²×°MySQL£¨ÂÔ£©
2.Æô¶¯¶à¸öMySQL·þÎñÆ÷
ҪʵÏÖÔÚµ¥»úÉÏÆô¶¯¶à¸öMySQL·þÎñÆ÷£¬ÓÐÁ½ÖÖ·½·¨£¬Ò»ÖÖÊÇÖ±½ÓʹÓÃmysqld_safeÀ´ÔËÐжà¸ö·þÎñÆ÷
µ±È»ÕâÑù·Ö±ð±à¼ÅäÖÃÎļþ£¬¶øÇҹرշþÎñÆ÷µÄʱºòÒ²Òª¶ÁÈ¡ÅäÖÃÎļþ£¬ËùÒԱȽÏÂé·³£¬ÁíÒ»ÖÖ·½·¨ÊÇʹÓÃ
MySQLÌṩµ½¹¤¾ßmysqld_multi½Å±¾À´¹ÜÀí¶à¸ö·þÎñÆ÷£¬ÏÂÃæ ......
InnoDB¸ÅÊö
InnoDB¸øMySQLÌṩÁ˾ßÓÐÌá½»£¬»Ø¹öºÍ±ÀÀ£»Ö¸´ÄÜÁ¦µÄÊÂÎñ°²È«£¨ACID¼æÈÝ£©´æ´¢ÒýÇæ¡£InnoDBËø¶¨ÔÚÐм¶²¢ÇÒÒ²ÔÚSELECTÓï¾äÌṩһ¸öOracle·ç¸ñÒ»ÖµķÇËø¶¨¶Á¡£ÕâЩÌØÉ«Ôö¼ÓÁ˶àÓû§²¿ÊðºÍÐÔÄÜ¡£Ã»ÓÐÔÚInnoDBÖÐÀ©´óËø¶¨µÄÐèÒª£¬ÒòΪÔÚInnoDBÖÐÐм¶Ëø¶¨ÊʺϷdz£Ð¡µÄ¿Õ¼ä¡£InnoDBÒ²Ö§³ÖFOREIGN KEYÇ¿ÖÆ¡£ÔÚSQL²éÑ¯Ö ......
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] £¬Ìí ......
mysql×Ö·û¼¯²é¿´ÒÔ¼°ÐÞ¸Ä
http://blog.csdn.net/cs870101/archive/2009/09/23/4580879.aspx
ת×Ô:http://blog.chinaunix.net/u2/85344/showart_2042280.html
LiunxÏÂÐÞ¸ÄMySQL×Ö·û¼¯£º
1.²éÕÒMySQLµÄcnfÎļþµÄλÖÃ
find / -iname '*.cnf' -print
/usr/share/mysql/my-innodb-heavy-4G.cnf
/usr/share/mysql/my-la ......